say I have a table like this: Rental_list
I want a result to show me people who rented a baseball before renting a soccer ball. The result should be Sam, who rented a baseball on 2-15 and a soccerball on 2-20
I know if i was simply looking for the customers first purchase i could use something like select name, min(date) from rental_list group by name
and i know the below would just provide the names of the two people who rented baseballs.
select name, min(date) from rental_list where product = 'baseball' group by name
so how can i make it so it pulls only sam, who rented a baseball then a soccerball?