SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE OR REPLACE VIEW rental_count AS (SELECT title, COUNT(*) FROM film f INNER JOIN inventory i USING(film_id) INNER JOIN rental r USING(inventory_id) GROUP BY title); @max_cnt := (SELECT MAX(r_cnt) FROM rental_count); SELECT title FROM rental_count WHERE r_cnt = @max_cnt

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear