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

Average book price per category

Join books with categories and compute the average price for each category.

Task

Write a query that joins the ksiazki (k) and kategorie (kat) tables on the condition k.kategoria_id = kat.id, then shows the category name (kat.nazwa) and the average price as srednia. Group the results by kat.id.