Put in order · SQL and MySQL course · Module 8: Subqueries
Steps of a correlated subquery
Arrange (top to bottom) the steps of running a correlated subquery for each author:
Items to put in order
- The outer query takes the next author (a.id)
- The Library moves on to the next author and repeats
- The condition checks the result - the author stays or drops out
- The subquery counts that author's books (k.autor_id = a.id)
You can check the correct answer by solving this task in the CodeWorlds game.