Coding task · SQL and MySQL course · Module 6: Aggregation and grouping

Books in each category

Count how many scrolls lie on each thematic shelf. Group the books by category.

Task

Write a query that, for each category (the kategoria_id column), counts the number of books. Select the kategoria_id column and COUNT(*), and group the result by kategoria_id.