1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation in SQL

Connected

Exercise

COUNT using CASE WHEN

Do the number of soccer matches played in a given European country differ across seasons? We will use the European Soccer Database to answer this question.

You will examine the number of matches played in 3 seasons within each country listed in the database. This is much easier to explore with each season's matches in separate columns. Using the country and unfiltered match table, you will count the number of matches played in each country during the 2012/2013 and 2013/2014 seasons.

Instructions

100 XP
  • Create a CASE WHEN statement counting the matches played in the '2012/2013' season.
  • Create a CASE WHEN statement counting the matches played in the'2013/2014' season, aliasing as matches_2013_2014.