I have a query like this:
SELECT COUNT(*) AS amount FROM daily_individual_tracking WHERE sales = \'YES\' AND daily_individual_tracking_date BETWEEN \'2010-01
Not really clear if you are looking for
DATEDIFF('2010-03-31', '2010-01-01')
or
COUNT(DISTINCT daily_individual_racking_date)