Using Postgres 9.4, I have a table
page_views which has a
page column. I'd like to select all the distinct pages and have a count before them and sort them descending. I'd also like to have a minimum count of 20 in the past 24 hours. So that it looks like this:
120 / home 56 / about 24 / locations
I was thinking:
select count(*),page from page_views group by page where count(*) > 20;
but this does not work. How to do this?