How to Have Multiple Counts
To count the number of books per category and the number of books published in a particular year, you can use the following query:
SELECT category, publish_date, COUNT(*) as count FROM books GROUP BY category,publish_date;
In this example, the GROUP BY clause groups the results by category and publish_date. The COUNT function calculates the number of books in each group.