Skip to content Skip to sidebar Skip to footer

Sqlite: How To Get A Count Of Group Counts

I have a SQLite table of user actions on a website. Each row is the same action on a web site, just different time/date, tagged with a user id. The table has more than 20Million

Solution 1:

As simply as adding another grouping above:

select event_count, count(*) as users_count
from
(select count(uid) as event_count
 from table
 group by uid) t
group by event_count
order by event_count

Post a Comment for "Sqlite: How To Get A Count Of Group Counts"