SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT c.name AS category, MIN(f.length) AS min_length, MAX(f.length) AS mах_length, AVG(f.length) AS avg_length FROM film AS f LEFT OUTER JOIN film_category AS f_c ON f_c.film_id = f.film_id LEFT OUTER JOIN category AS c ON c.category_id = f_c.category_id GROUP BY c.name ORDER BY c.name ASC;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear