Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Medical Center database
Non primary-foreign key JOINs
Non-equi JOINs
Non-equi self JOINs
Summary

Instruction

Okay, let's try some exercises!

Exercise

For every couple that wants an apartment, show their name together with the IDs of all apartments within their price range.

Stuck? Here's a hint!

Type:

SELECT
  couples.couple_name,
  apartments.id
FROM couples
JOIN apartments
  ON apartments.price BETWEEN couples.min_price AND couples.max_price