AllRounder.ai
Chapters in this course

Enrol to start learning

Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.

Enrol free

3. Aggregations & Grouping

  • This section

    Practice test

    12 questions on this section. Wrong answers show you what to read again.

    Sign up to take it
  • Whole chapter

    Revision test

    Mixed questions from across the chapter. Your answers get marked.

    Sign up to take it
  • Quick

    Flashcard drill

    5 cards from this lesson. Good the night before a test.

Try these first

  1. 1.

    What function would you use to count the total number of records?

    Hint

    Remember, it gives you the headcount of records.

  2. 2.

    What does the SUM function calculate?

    Hint

    Think about adding up numbers.

  3. 3.

    What function would you use to find the total number of sales transactions?

    • COUNT
    • SUM
    • AVG
    Hint

    It’s used for headcounts.

  4. 4.

    The HAVING clause is used to filter records before grouping.

    • True
    • False
    Hint

    Associated with GROUP BY.

  5. 5.

    How would you find out which products sold the most in the last month? Provide a SQL query example.

    Hint

    Filter sales based on dates and group by product_id.

  6. 6.

    Draft a SQL query using a GROUP BY and HAVING clause to find out how many support tickets are open for each priority level, and show only those levels with more than 5 tickets.

    Hint

    Ensure to count and set a threshold for open tickets.

Exercises

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

4 more questions available

Enrol free

Quiz

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

2 more questions available

Enrol free

Challenge Problems

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting