Subquery - allows us to use multiple SELECT statements, where we basically have a query within a query
SELECT * FROM film
WHERE rental_rate > (SELECT AVG(rental_rate) FROM film) — SELECT *
FROM film
WHERE film_id IN
(SELECT inventory.film_id
FROM rental
JOIN inventory ON inventory.inventory_id = rental.inventory_id
WHERE return_date BETWEEN '2005-05-29' AND '2005-05-30')
We use cookies to understand our websites traffic and offer our website visitors personalized experience. To find out more, click ‘More Information’. In addition, please, read our
Privacy policy.