Check out example codes for "date sql get the last week count". It will help you in understanding the concepts better.

Code Example 1

select * from dt_table where  `date` >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)

Learn ReactJs, React Native from akashmittal.com