SQL Aggregates

Prework for SQL Aggregates

In your notebook, define the following terms:

  1. Minimum
  2. Maximum
  3. Sum
  4. Average

If you are unsure of what these terms refer to, check out the guide below, then redefine them in your own words.

Some Math Terms

  • Min: The first item in an ordered list. EX: the smallest of a set of numbers.
  • Max: The last item in an ordered list. EX: the largest of a set of numbers.
  • Sum: The total of a collection of numbers. EX: the sum of {1, 3, 5, 4, 2} is 15. 1 + 3 + 5 + 4 + 2 = 1
  • Average: A single number that represents the commonality of a set of numbers. Add up a series of numbers and divide the sum by the total number of values to find the average. EX: the average of {1, 3, 5, 4, 2} is 3. (1 + 3 + 5 + 4 + 2) / 5 = 3

Watch This Video That introduces Aggregate Functions. After watching the video, reflect on the questions below in your notebook:

  1. Create a definition for the word ‘aggregate’.
  2. Do you think we could find the ‘MIN’ value of a text field? Why, or why not?
  3. What do you think ‘NULL’ represents in SQL?

Watch This Video which introduces GROUP BY. After watching the video, reflect on the questions below in your notebook:

  1. In your own words, how does ‘GROUP BY’ change the behavior of aggregate functions?
  2. Copy the text that is shown in the video at 3:53. Do your best to unpack the statement - what does it mean?

Lesson Search Results

Showing top 10 results