I want all the names of the user who has booked them 10 days before the current date. (There are multiple entries for a single user that's why I’m using the
GROUP BY command.) Please let me know if there is any other way.
SELECT booking_date, user_id FROM booking HAVING max( booking_date ) < curdate( ) -10 group by user_id