To get customers who have made a purchase in the last 30 days, write a SQL query that returns all customers with a purchase_date within the last 30 days.
The solution above is a good solution that demonstrates a level of completeness and solves the problem. The approach is also good, using the DATE_SUB function to subtract 30 days from the current date. This is optimal because it will always return the correct results, regardless of the current date.
Evaluated at: 2022-11-18 14:16:25