Coding task · SQL and MySQL course · Module 11: Capstone project

How many loans each reader has

Join two tables and count rows in groups - a classic of reporting.

Task

Write a query that joins the czytelnicy (c) and wypozyczenia (w) tables on the condition c.id = w.czytelnik_id, then for each reader shows their imie and the number of loans as liczba. Group the results by c.id.