Query Help for Statistics Table
Posted on 2012-08-25
My Table Structure looks like this:
CREATE TABLE IF NOT EXISTS `statistics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`section` varchar(32) NOT NULL,
`action` varchar(32) NOT NULL,
`when` int(11) NOT NULL,
`uri` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
I am tracking page views in my MVC application ( tracking the controller, and the method , along with the entire URL ). Also, notice I am tracking the TIME.
Now that I have this information, I need to know how to USE it.
1. What is the most popular controller (section)?
2. How many people visited on a particular date?
3. Which method is being used the least?
4. TOTALS - for each controller, for a particular day
I am not the best at queries. I hope I am collecting enough info to get the data I need.
Can someone help me with the queries please?