Forum Moderators: coopster
I'm working on some stats stuff, and been trying to get a query to find the total amount clicked in the month may and also for all the other months throughout the year.
Here's my table structure...
tid
ip_address
clicked
chat_date
I think I need to get the month using MONTHNAME(chat_date) AS month, then I need to query that month in the table.
Any thoughts?
Thanks
ip_addresson any given
chat_date, the
clickedcolumn seems a bit redundant. You can accomplish your goal in a single SQL statement.
SELECT
MONTHNAME(chat_date) AS month,
COUNT(*) as total
FROM clicks
GROUP BY month
;