Professional Documents
Culture Documents
EmployeeID ProductID
CategoryID
LastName ProductName
CategoryName
FirstName SupplierID
Description
Birthdate CategoryID
Photo Unit
Notes Price
OrderDetails:
OrderDetailsID
OrderID
ProductID
Quantity
Suppliers
SupplierID
SupplierName
ContactName
Address
City
PostalCode
Country
Phone
1. Create a view that selects every product in the ‘Products’ table with a price higher than the
average price.
2. Write a query to get the Category for which the highest number of Products have been
ordered.
3. Write a query to get the Customer and Shipper information where the same customer has
been serviced by a shipper the maximum number of times along with the date of service
4. In table Order Details, I want to append the OrderID with the Category name and ProductID
for each order
5. Which employee and shipper combination has serviced maximum number of Customers.
https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all
2.
4. update orderDetails
set OrderID = (select CategoryName from categories where OrderID = CategoryID)
;