Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Function AVG
18. AVG and GROUP BY
Functions SUM, MAX, MIN
Review

Instruction

Correct! Of course, we can use AVG with GROUP BY, just as we used COUNT:

SELECT
  client_id,
  AVG(price)
FROM project
GROUP BY client_id;

The above query will find the average price each customer paid for their projects.

Exercise

Show each translator's ID together with the average number of words they had to translate in all their projects (as average). Exclude project with ID 6 – it was cancelled.

Stuck? Here's a hint!

Use the inequality sign != to exclude project with ID 6.