Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with an SQL query with the following questions What are the top 10 o

ID: 3585668 • Letter: I

Question

I need help with an SQL query with the following questions

What are the top 10 orders according to quantity?

What were the top 10 orders according to final cost? (quantity x unit cost)

How many regions do each employee work?

What was the average time from order to shipping for each employee? (shipping Date - order date)

I think these are all the tables related to the questions
The tables are attached:

Limt to 1000 rows- 1SELECT FROM Products Result Grid Wrap Cell Content ProductID ProductName SuppierID CategoryID QuanttyPerUnit UnitPrice UnitsInStock UnitsOnOrder Rcorderlevel Discontinued Chef Anton's Caiun Seasonina 2 Chef Anton's Gumbo Mx Grandma's Bovsenberry Soreed 3 Unde Bob's Oraanic Dried Pears 3 Northwoods Cranberrv Sauce 3 Oueso Mancheco La Pastora 5 Teatime Chocolate Eisouits

Explanation / Answer

Top 10 orders according to quantity
1- SELECT * FROM Products
ORDER BY UnitsOnOrder DESC
LIMIT 10;

2- top 10 orders according to the final cost-
insert into Products select QuantityPerUnit*UnitPrice as TotalSales from Products;

SELECT * FROM Products
ORDER BY TotalSales DESC
LIMIT 10;

3-Select COUNT(TerritoryID) as [Number of regions],EmployeeID
FROM employeeterritories
group by EmployeeID;

4- no table provided for order date and shipping date .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote