I have the following SQL query that returns the top five weeks where the most questions were answered. The weeks are being returned by the number but I want the first date of the week instead of the number.
SELECT Count(*) AS answered,
Week(score_datetime) AS week,
Year(score_datetime) AS year
FROM development.score
WHERE score_datetime IS NOT NULL
GROUP BY Week(score_datetime)
ORDER BY answered DESC
LIMIT 5;
My sql skills aren't the best so I am currently getting the date from the week number when returned with momentjs. So if anyone knows how I could include the date in the above query by what the week number and year is it would be much appreciated.