We have a lot more ages now. How do we get the average age?

SELECT AVG(age) FROM people;SELECT age FROM people
  WHERE age = AVG(age);
SELECT AVG() FROM people
  WHERE age;
SELECT age FROM people
  WHERE AVG();

Bingo. We have to pass a parameter to our function, so it knows what values to calculate with! Clauses don't accept aggregate functions.

Nope. We have to pass a parameter to our function, so it knows what values to calculate with! Clauses don't accept aggregate functions.