Hello for the seventh time in this course! Today, we're going to learn a powerful construction in SQL, namely
CASE WHEN … THEN … ELSE … END (in short:
CASE WHEN). Just by looking at the keywords, you may already guess that we're going to introduce conditional statements to our SQL queries: if A happens, then do B.
CASE WHEN statement isn't a new function in SQL, it's a completely new construction in SQL. It is very commonly used with various aggregate functions, so we decided to include it in this course.
But first things first. Today, we're going to help a university which is currently accepting students for five brand-new degree courses. Want to find out what they are? Well, let's check that!