From the course: SQL for Non-Programmers

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Challenge: Practice with advanced commands

Challenge: Practice with advanced commands - SQL Tutorial

From the course: SQL for Non-Programmers

Challenge: Practice with advanced commands

Management is back with some last requests, and I have a feeling we can use advanced SQL commands to complete them. Management needs to confirm a few different data points, and we'll have to use various features of SQL to get them exactly what they need. Are you ready for your last challenge? Everything can be completed using only the olive oil sales data table. First, we have been asked to provide total sales for a few of the top selling product lines sold: lemon, rosemary, and chili. Keep in mind that the product line always comes at the beginning of a product name. Exclude all other product lines and order the report from highest to lowest total sales. How much did each of these product lines sell? Which has sold the most? Besides, total sales also include the average price per item sold for each of the lines. Here's a little hint. Consider how you can do this using the field's order total and quantity. Which is selling more expensive items on average, which is selling the lowest…

Contents