I have made this working sql query to count the ads the user has in total ->
SELECT count(*) FROM `table_name` WHERE `user_id` = 20;
So this shows how many ads the user has in total. What I want to add is how many ads the user added in the last 7 days… so I have a column in table_name called “created_date”… so can somebody please help me how to count the user ads by “created_date” from now to last 7 days please?
Thank you
More generally, look at MySQL’s date functions for all sorts of advanced date handling.