From the course: SQL Essential Training

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

IF THEN logic with CASE

IF THEN logic with CASE - SQL Tutorial

From the course: SQL Essential Training

IF THEN logic with CASE

- [Instructor] The managerial team at WSDA Music has been greatly benefiting from the reports that you have supplied to them thus far. In fact, so much so they're now in a position to set some new sales goals. The managerial team now wants as many customers as possible to spend between 7 and $15 when purchasing music from their online store. As a result, they've created the following categories; a baseline purchase, which is anything that falls between 99 cent and 1.99, a low purchase which falls between $2 and 6.99, the target purchase, which is the sales goal of $7 and $15 and a top performer category which is anything that is above $15. Now, based on these categories, the WSDA Music Sales Department wants to see if there's any information that they can decipher or glean from the database concerning the sales in all of the listed categories. Now this is a great scenario to introduce the CASE statement which will help us…

Contents