I am going to explain you example of how to get last 10 days data in MySQL?. You will learn MySQL query to get last 10 days data. I would like MySQL select last 10 days. This article will give you simple example of SQL query to get last 10 days data.
We will use get search how to select last 10 days from news table using MySQL. You can understand a concept of search how to take last 10 days dates from the current month in MySQL. So, we can illustrate the getting a date 10 days in the past MySQL.
You can see both example of how do I get my last 10 days data in MySQL.
Let's see bellow example:
Solution SQL Query:
WHERE DATE(created_at) >= (DATE(NOW()) - INTERVAL 10 DAY)
I hope it will help you...