Introduction
Simple CASE WHEN
Searched CASE WHEN
CASE WHEN with aggregates
CASE WHEN with GROUP BY
21. CASE WHEN with GROUP BY – practice 2
Revision

Instruction

Fine! And yet another one so that you can become the master of GROUP BY with CASE WHEN.

Exercise

For each degree course, show its ID (as id) and the number of candidates who applied for this course and have the preferred_contact set to:

  1. mobile (column: count_mobile),
  2. mail (column: count_mail).

Stuck? Here's a hint!

Things are getting serious. You will need to JOIN two (or three if you'd like) tables this time!

Console

Code editor

Result

TableConsole