SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT JSON_ARRAYAGG( JSON_OBJECT( 'id', id, 'title', title, 'category', category ) ) AS film ORDER BY id DESC 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