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
explain analyze SELECT c.name category , sum(CASE WHEN i.store_id = 1 THEN 1 END) AS store_1 , sum(CASE WHEN i.store_id = 2 THEN 1 END) AS store_2 FROM category c JOIN film_category fc ON c.category_id = fc.category_id JOIN inventory i ON i.film_id = fc.film_id JOIN store s ON s.store_id = i.store_id GROUP BY c.name; -- show status like '%cost'; explain analyze SELECT c.name category , sum(CASE WHEN i.store_id = 1 THEN 1 END) AS store_1 , sum(CASE WHEN i.store_id = 2 THEN 1 END) AS store_2 FROM category c JOIN film_category fc ON c.category_id = fc.category_id JOIN inventory i ON i.film_id = fc.film_id GROUP BY c.name; -- show status like '%cost';

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

Copy Clear