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
I was trying to achieve the same without subquery and was able to get the required result as below
SELECT DISTINCT COUNT(*) OVER () AS TotalRecords FROM temptable GROUP BY column_1, column_2, column_3, column_4