CASE
statements allow you to categorize data that you're interested in -- and exclude data you're not interested in. In order to do this, you can use a CASE
statement as a filter in the WHERE
statement to remove output you don't want to see. CASE
statement as a filtering column like any other column in your database. The only difference is that you don't alias the statement in WHERE
.