SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select JSON_ARRAYAGG(JSON_OBJECT(c.name, count(fc.film_id))) as films_by_category from category c join film_category fc using(category_id) group by c.name

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear