Put in order · SQL and MySQL course · Module 8: Subqueries
An average from a derived table
Arrange (top to bottom) the lines of the query computing the average number of books per author from a derived table:
Items to put in order
- ) AS zestawienie;
- SELECT autor_id, COUNT(*) AS liczba FROM ksiazki GROUP BY autor_id
- FROM (
- SELECT AVG(liczba) AS srednia_ksiazek
You can check the correct answer by solving this task in the CodeWorlds game.