I have a set of sales numbers and am trying to rank them by week. The query works great, except that I end up with a week number. How can I convert that week number to a beginning of week date?
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