How to form a SQL query?


There is a table with records like this:

Recorded in the statistics on page views. I.e. there are records with the same post_id but different date.
Need to display 10 most popular post_id per week.

Thank you.
June 26th 19 at 14:16
1 answer
June 26th 19 at 14:18
Decided I don't know how:
SELECT post_id, SUM(view) AS Allview FROM post_stat WHERE date>=" AND date<=" GROUP BY post_id ORDER by Allview DESC LIMIT 0,10

Find more questions by tags MySQL