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

Books more expensive than average

Use a subquery to compare each book's price with the average price of all books.

Task

Write a query that retrieves tytul and cena from the ksiazki table only for those books whose cena is greater than the average price of all books. Compute the average with a subquery using the AVG(cena) function.