Friday, March 27, 2009

Statistical SQL query



For example you need to count how many companies in which source system:

select count(*), source_system_id from company group by rollup(source_system_id)