Write the sql statements to get all the orders placed


Problem

Using the Orders database introduced in Watt (2014) - Appendix C; write the SQL Statements for below cases:

A. Get all the orders placed by a specific customer. CustomerID for this customer is MAGAA

B. Show customers whose ContactTitle is not Sales Associate. Display CustomerID, CompanyName, Contact Name, and ContactTitle

C. Show customers who bought products where the EnglishName includes the string "chocolate". Display CustomerID, CompanyName, ProductID, ProductName, and EnglishName

D. Show products which were bought by customers from Italy or USA. ". Display CustomerID, CompanyName, ShipCountry, ProductID, ProductName, and EnglishName

E. Show total price of each product in each order. Note that there is not a column named as total price. You should calculate it and create a column named as TotalPrice. Display OrderID, ProductID, ProductName, UnitPrice, Quantity, Discount, and TotalPrice

F. Show how many products there are in each category and show the results in ascending order by the total number of products. Display CategoryName, and TotalProducts

G. Show the total number of customers in each City. Display Country, City, TotalCustomers

H. Show the orders which were shipped late than the actual required date. Display OrderID, OrderDate, RequiredDate, and ShippedDate.

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Write the sql statements to get all the orders placed
Reference No:- TGS03213118

Expected delivery within 24 Hours