txt3rob
November 19, 2014, 2:01pm
1
Hi Guys,
I have a COL named rDate which is a date type column.
SELECT DATE_FORMAT(`rDate`, '%M') AS DATE,
COUNT(*) AS number FROM `cars`
WHERE `rStatus` LIKE 'Total%'
What i am trying to do is count how many rows per month.
Could any one help me here so i can get a count for each month?
txt3rob
November 19, 2014, 2:49pm
3
Cheers dude.
I’ve done the following now
SELECT MONTH(rDate) AS MONTH , COUNT(rDate) AS COUNT FROM cars WHERE rDate >= NOW() - INTERVAL 1 YEAR AND `rStatus` LIKE 'Total%' GROUP BY MONTH(rDate)
done some coding and got it working
2 Likes
system
Closed
February 18, 2015, 9:55pm
4
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.