How do I count the number of records returned by a group by query,
For eg:
select count(*) from temptable group by column_1, column_2, column_3, co
A CTE worked for me:
with cte as ( select 1 col1 from temptable group by column_1 ) select COUNT(col1) from cte;