How to Work with Subqueries in SQL