SQL queries can get complex. For example, you might have been a little thrown off by the many to many join in the last lab. There, you had to join four tables. This is just the tip of the iceberg.
Subqueries are a good fit when the logic is simple, the result is only needed once, or you need a quick inline calculation. The example below from city_hospital finds all patients who have attended ...