It's Autumn! Prices fall like leaves! - hours only!Up to 80% off on all courses and bundles.-Close
Function AVG
24. ROUND and AVG
Functions SUM, MAX, MIN


Okay. Finally, we can use ROUND with AVG to get a nicer appearance for our results:

  ROUND(AVG(price), 2)
FROM project;

The above query will round the average price to two decimal places. Of course, you can also use AVG without the second argument: ROUND(AVG(price)) to get rounding to integer values.


For each client, show the ID and find the average price for all their projects rounded to integer values. Column names should be client_id and rounded_average.

Stuck? Here's a hint!

Use ROUND(AVG(price)) and group by the client_id.