Skip to content
KALANBLON
Show contents

Chapter 3 of 3 · 10 min

Quiz: querying a table

SELECT, WHERE, GROUP BY, HAVING: let's check that you can query a table. You need 70% correct answers.

Quiz

5 questions · pass mark: 70%

  1. 1.Which clause keeps only certain rows?

    One answer

  2. 2.Why does this query fail?

    One answer

    SELECT * FROM sales WHERE city = Lima;
  3. 3.Which are aggregate functions? (several answers)

    Several answers possible

  4. 4.Complete to keep only the cities whose total exceeds 50.

    Complete the code

    SELECT city, SUM(quantity) AS total
    FROM sales
    GROUP BY city
    ____ total > 50;
  5. 5.How many rows does a query with GROUP BY city return on a table that contains 3 different cities?

    One answer

Your progress is saved on this device. Create a free account to keep your progress on all your devices.