3
我使用下面顯示添加在過去7天的產品個性化......我可以採用某種定製查詢,以顯示所有過去的7天,即使COUNT = 0?顯示值即使空
查詢,因爲它代表:
SELECT DAYNAME(dateadded) DAY, COUNT(*) COUNT
FROM `products`
WHERE (`dateadded` BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND CURDATE() && site_url = 'mysite.com')
GROUP BY DAY(dateadded)