Practical examples on Joins and subqueries