Back to Chapters
Chapter Progress: 0 %0 / 6 Lessons Read
‹›

2. Summarising data: totals and groups

2.6 Chapter 2 test

Highlights & notes

Select lesson text to highlight it, or tap Add note.

    Bookmarks

    Bookmark a lesson to see it here.

      Six questions on aggregates, GROUP BY and HAVING: two Easy, two Medium and two Hard.

      Question 1 · Easy

      Which function counts rows?

      Question 2 · Easy

      What does AVG(amount) return?

      Question 3 · Medium

      What is SUM(amount) for orders WHERE product = 'Mouse'?

      Question 4 · Medium

      How many rows does SELECT status, COUNT(*) FROM orders GROUP BY status return?

      Question 5 · Hard

      Why does WHERE COUNT(*) > 1 give an error?

      Question 6 · Hard

      How many customer_id groups have SUM(amount) > 50000 in orders?

      Key takeaways

      Review any question you missed, then move on to the next chapter.

      Lesson 12 of 24

      Save your progress

      Start free and your progress, code and notes stay saved. Free for 1 month, no card needed.

      Start free Log in
      PreviousChapter 2 test
      Save your progress free for 1 month. Start free · Log in