Question · SQL and MySQL course · Module 10: Transactions and advanced SQL
Aggregates with OVER
What will AVG(cena) OVER (PARTITION BY kategoria_id) do in a query?
Answer options
- It returns a single row with the average price of all books
- It adds to each row the average price computed within its category
- It removes all rows except the cheapest in the category
- It changes every book's price to the average value
You can check the correct answer by solving this task in the CodeWorlds game.