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 f.title, release_year from film f left join ( select max(length) as length, min(replacement_cost) as replacement_cost from film group by length having count(length) > 1 order by max(length) desc ) as b on f.length = b.length and f.replacement_cost = b.replacement_cost order by b.length desc limit 1 ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask AI support!

Copy Clear