From the course: SQL Essential Training

Unlock the full course today

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

Solution: Categorize tracks by price

Solution: Categorize tracks by price - SQL Tutorial

From the course: SQL Essential Training

Solution: Categorize tracks by price

In this challenge, you've been tasked by the management at Red30Tech to produce a query which selects track names, composers, unit prices, and categorizes each track based on its price. Let's take a look at our response. Starting with our comment block, which we've specified the name, create date, as well as a short description of what our query is doing. Now going down to the FROM clause, where we're specifying the table we're interested in getting our data from, which is the track table in this case. Now up to the SELECT clause. We are now going to specify the fields of the track table that we're interested in seeing in our result. And those fields are starting with name, which we've aliased as trackName. The trackName alias is surrounded with double quotes because of the space between the word track and name. Next we have a comma separating our next field which is composer. The third field we're interested in seeing is unit price and we're aliasing this field with the word price…

Contents