SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT s.store_id, COUNT(*) AS rented_at_2005_05_31 FROM rental r JOIN customer c USING (customer_id) JOIN store s ON c.store_id=s.store_id WHERE r.return_date<'2005-05-31' OR rental_date is null GROUP BY s.store_id ORDER BY s.store_id;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear