1. Learn
  2. /
  3. Courses
  4. /
  5. Reporting in SQL

Connected

Exercise

Filtering out nulls

One way to deal with nulls is to simply filter them out. There are two important conditionals related to nulls:

  • IS NULL is true for any value that is null.
  • IS NOT NULL is true for any value that is not null. Note that a zero or a blank cell is not the same as a null.

These conditionals can be leveraged by several clauses, such as CASE statements, WHERE statements, and HAVING statements. In this exercise, you will learn how to filter out nulls using two separate techniques.

Feel free to reference the E:R Diagram.

Instructions 1/3

undefined XP
    1
    2
    3
  • Setup a query that pulls country and total golds as gold_medals for all winter games.
  • Group by the non-aggregated field and order by gold_medals in descending order.