SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT CONCAT( '[', GROUP_CONCAT( JSON_ARRAY( 'id', id, 'title', title, 'category', category ) ORDER BY id ), ']' ) AS film FROM ( SELECT film_id AS id, title, name AS category FROM category JOIN film_category USING(category_id) JOIN film USING(film_id) ) AS films;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear