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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Types of SQL operators2m 35s
-
(Locked)
Filter and analyze numeric data3m 56s
-
(Locked)
BETWEEN and IN operators4m 5s
-
(Locked)
Filter and analyze text data4m 58s
-
(Locked)
Search records without an exact match6m 19s
-
(Locked)
Filter and analyze using dates5m 48s
-
(Locked)
Filter records based on more than one condition3m 36s
-
(Locked)
Logical operator OR2m 39s
-
(Locked)
Brackets and order6m 1s
-
(Locked)
IF THEN logic with CASE9m 52s
-
(Locked)
Solution: Categorize tracks by price4m 36s
-
-
-
-
-
-
-
-
-