I have created this mysql code to count at only specific date range, i dumped the output of my mysql code and here it is:
SELECT COUNT(
IF(
DATE(q.date_emailed) BETWEEN '2014-02-01' AND '2014-02-28',
1,
0
)
) AS 'Feb',
COUNT(
IF(
DATE(q.date_emailed) BETWEEN '2014-03-01' AND '2014-03-31',
1,
0
)
) AS 'March',
COUNT(
IF(
DATE(q.date_emailed) BETWEEN '2014-01-01' AND '2014-01-31',
1,
0
)
) AS 'Jan'
FROM
database.quotes q
WHERE (DATE(q.date_emailed) BETWEEN '2014-01-01' AND '2014-03-31')
But this outputs same count for each month, in which i confirmed that february and march has zero counts. What am I missing here?
date_emailed?