I'm currently at university and doing a project where I have queries such as:
Select * from recent_purchases where customer_id in 
(  select customer_id from 
   customers where name like '%john%'
) 
I'm not sure if this is the most idiomatic way of doing things or if I'm missing the "correct" way of doing it - it certainly feels a bit clunky. I don't really understand joins yet. Sorry if a stupid question.
 
     
    