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

SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share code      Blog   Popular   FAQ

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

Copy Format Clear
SELECT film_id FROM inventory GROUP BY film_id HAVING COUNT(*) = ( SELECT COUNT(*) AS cnt FROM inventory GROUP BY film_id ORDER BY cnt DESC LIMIT 1 ) ORDER BY film_id LIMIT 1;

Stuck with a problem? Got Error? Ask ChatGPT!