kostas

kostas

How to group by date in Oracle database

I keep forgetting how to do this. How to group on a date column (date_col in the example) in Oracle: SELECT count(*) FROM table GROUP ON TO_CHAR(date_col, ‘DD-MON-YYYY HH:MI:SS’) For other format strings than ‘DD-MON-YYYY HH:MI:SS’ see this page.

How to split a log file into smaller files

In this example I had a big log file (many million lines), that I wanted to split into smaller logfiles (each one million lines) for processing on Elastic MapReduce. -rw-r–r– 1 kostas staff 543067012012 Oct 11 13:45 huge_logfile This is…

China in a few years?

Completely off topic. Just a thought, is this what China will look like in a few years? A country of old people, governed by the children of the one-child policy era… Wonder how that will affect the current financial situation…