I want to group my data by year, but the week starts here on Sunday. How can I group my week from Monday to Sunday?
Here is my request:
SELECT YEARWEEK(dateStats) k,dateStats udate, COUNT(f_shop) sales
FROM sal_import WHERE dateStats BETWEEN "2011-08-15" AND "2011-08-21" GROUP BY YEARWEEK(dateStats)
There is a date between Monday and Sunday, and I only need one line as a result.
Many thanks
source
share