Coding task · SQL and MySQL course · Module 6: Aggregation and grouping
Only available books per category
First filter out the unavailable books (WHERE), and only then count them in each category.
Task
Write a query that selects kategoria_id and COUNT(*) from the ksiazki table, takes into account only the rows where dostepna = 1, and groups the result by kategoria_id.