Skip to content
Advertisement

mySQL – How can I see which users submitted orders last month but not this month?

I need to figure out the users who submitted orders last month but not this month. This is my current query to count total users, but how can I cross check to see who has bought this month but not the last?

This is my the customer orders table enter image description here this would be the expected output, a list of all the users this would be the expected output, a list of all the users

EDIT: Additionally, I’m trying to get a report of the users who submitted orders in July but not August, with their amount total for the month, number of orders, and user cellphone #. This is the query I’m using but its not giving me the result.

This is my subscriber table, and above is my customer orders table. enter image description here

Advertisement

Answer

As I understood you want to filter the user’s which are again created in current month. So,

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement