I have a stats table that contains the date and page of each page hit on my site, I'd like to run a query that counts all the views to each page that day and posts the most popular for the day...My site is days from finished and this is the only thing that eludes me.
Thanks in advance if you have any suggestions.
I dont know your table structure, but as you explain it it should be something like this ...
SELECT COUNT(DISTINCT `page`) as nr_views, `date` FROM `stats` GROUP BY `date`
assuming date is a DATE TYPE field ...
date