Question: Instructions Introduction Summarizing data and running complex queries are tasks that are very important to the professional database developer. This lab will help you develop

 Instructions Introduction Summarizing data and running complex queries are tasks that

Instructions Introduction Summarizing data and running complex queries are tasks that are very important to the professional database developer. This lab will help you develop these skills. You will be using the thinkcube database for this lab You will need to import the tradeshow_leads.backup file that is found at the top of this section. You will follow the exact same steps as when you imported the thinkcude.backup file in lab 1. You will restore into the thinkcube database Submission Make sure to save all commands from each step You will submit a single file. Filename should be-lab8.sql Tasks 1. Select all customers from Canada. This must be done as a JOIN 2. Select all orders for customers between ids 4563 and 5678. Display the customer name, customer city, order id and order date. Order the results from oldest to newest based on order date 3. Redo #2, this time only for customers in Canada 4. Redo #3, also display the name of the province in addition to the fields already defined 5. Calculate the average price in the order lines for product version id 198 6. Calculate the maximum price in the order lines for product version id 198 7. Calculate to the order total for order id 34567. Display the order id, the order date, the count of order lines and the sum of the extended price 8. Calculate the average selling price for any product in the product name of Groovecom 9, Redo #8 as a subquery 10. Calculate the average, minimum and maximum number of order lines per order. I just want the average,minimum and maximums of all orders combined. This will required a derived table that calculates the number of order lines grouped by order 11. Calculate the average number of orders per customer in Ontario 12. Calculate the average sum of the extended price per customer for the first 500 customers. 13. Retrieve all columns from both products and product versions using a regular join 14, Redo #13, this time use a left join. What is different this time? 15. Redo #14, this time limit only to products in the products table that are not in the product versions table 16. Using a union operator, retrieve a list of email address from both the customers and tradeshow leads tables 17. Using an except operator, identify all customers in the table tradeshow_leads that are not in the customers table using the e- mail field 18. Using an intersect operator, identify all customers in the table tradeshow leads that are in the customers table using the e- mail ield

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!