Count number of records returned by group by

前端 未结 13 1787
梦毁少年i
梦毁少年i 2020-11-30 20:01

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         


        
13条回答
  •  离开以前
    2020-11-30 20:34

    Can you execute the following code below. It worked in Oracle.

    SELECT COUNT(COUNT(*))
    FROM temptable
    GROUP BY column_1, column_2, column_3, column_4
    

提交回复
热议问题