Users table: userid, registration_dt
Orders table: userid, orderid, date, amount,
category
What query would be needed to obtain a list
of users who made 2 consecutive orders
from the same category?
Userid, orderid, category:
1, 100, 3
1, 132, 2
2, 156, 4
1, 187, 2
2, 194, 2