Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
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 AI support!

Copy Clear