我有一组销售数字,我试图按周排名。查询效果很好,除了我最后得到一个周数。如何将周数转换为周日期的开头?
SELECT
SUM(`Sales`) `Record`,
Week(`DateTime of Sale`),
'Sales Record' AS `Category`,
'Weekly' AS `Interval`
FROM `SalesTable`
GROUP BY
DATE(`DateTime of Sale`)
ORDER BY SUM(`Sales`) DESC
LIMIT 2