Question: Attempt all 10 questions using the TSQLV4 database. 1 Categories, and the total products in each category Return CategoryName and TotalProducts. 2 Total customers per
Attempt all 10 questions using the TSQLV4 database.
1 Categories, and the total products in each category
Return CategoryName and TotalProducts.
2 Total customers per country/city
Return the total number of customers per country and city.
3 Customer List by region
Return CustID, CompanyName, and Region for all customers.
Sort by region alphabetically. Customers whose Region is Null should be listed last.
4 High freight charges
Return the ship countries with the highest average freight overall, in descending order by average freight.
5 High freight charges in 2015
Return the ship countries with the highest average freight in 2015, in descending order by average freight.
6 Orders from the customer(s) with the greatest number of orders
Write a query that returns all orders placed by the customer(s) who placed the highest number of orders.
7 High freight charges the last year (the last 12 months)
Return shipcountry, AverageFreight during the last 12 months of order data, using as the end the last OrderDate in Orders.
8 Inventory List
Return EmpID, LastName, OrderID, ProductName, and Qty for all orders.
9 Customers with no orders
Show customers who have never placed an order.
- Customers with no orders for Empid = 4
Although the employee with EmpID = 4 has placed the most orders, there are some customers who have not placed an order with her. List those customers.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
