Let's consider I have table like this :
id name addr_line 1 addr_line_2 rec_ins_dt rec_updt_dt
and I want to show output as follows :
rec_ins_dt rec_ins_dt_count rec_updt_dt rec_updt_dt_count
How can I achieve this result using single query ? I understand this can be done by creating temp tables and then joining two temp tables together but I want to use single query. Following are the additional limitations while executing this query :
Input data : 1 billion rows Memory : 4 GB
Please consider platform as Oracle or Netezza. Thank you for your inputs.