I\'m trying to select the order total sum ($) and invoice count over a 5 day period in a single query. I can\'t seem to get this to happen though. The current query I have
WHERE created <= NOW() AND created >=NOW() - INTERVAL 5 DAY
or it would be better to compare just DATE part of datetime:
WHERE DATE(created) <= date(NOW()) AND DATE(created) >= DATE(NOW() - INTERVAL 5 DAY)