1. Write a query to display the sales person ID, territory ID, and territory name of all the sales
persons in the following format. (Use the AdventureWorks database)
2. Write a query to display the sales person ID of all the sales persons and the name of the territory to which they belong. (Use the AdventureWorks database)
Ans.
2. Write a query to display the sales person ID of all the sales persons and the name of the territory to which they belong. (Use the AdventureWorks database)
Ans.
3.Write a query to display the sales person ID and territory names for all the sales persons. If a
sales person does not belong to any territory, NULL should be displayed as shown in the following
format. (Use the AdventureWorks database)
Ans,
Ans.
4. Write a query to display the sales order ID, the product ID, and the order date for all the products
in the following format. (Use the AdventureWorks database).
Ans.
5.Write a query to display the order number, territory name, order date, and the quarter in which
each order was placed in the following format. (Use the AdventureWorks database)
6. Write a query to display the sales order ID, territory name, month, and year of all the sales orders
in the following format. (Use the AdventureWorks database)
7. Write a query to display the total amount due for all the sales orders rounded off to a whole
number. In addition, display the sales order ID and the type of credit card through which the
payment was made. (Use the AdventureWorks database)
8. Write a query to display all the country region codes along with their corresponding territory IDs.
(Use the AdventureWorks database)
9. Write a query to display the total amount due for all the orders in the AdventureWorks database in
the following format:
10 Write a query to display the order date along with the sales order ID and the territory name. The
order date should be displayed in the dd/mm/yyyy format. (Use the AdventureWorks database)
11. Write a query to display the sales order ID and the territory name of the orders where the month of
the order is May and the year is 2004. (Use the AdventureWorks database)
12. Write a query to display the contact ID of the customers that have the 'Vista' credit card. (Use the
AdventureWorks database)
13. Write a query to display the sales order IDs of the orders received from the Northeast territory.
(Use the AdventureWorks database)
14. Create a report containing the sales order ID of those orders where the total value is greater than
the average of the total value of all the orders. (Use the AdventureWorks database)
15. Write a query to display the sales order IDs of the orders that have been paid through a
SuperiorCard. (Use the AdventureWorks database)
16. Write a query to display the sales order ID, the order detail ID, and the total value of those orders
where the total value is greater than the maximum of the total value of order ID 43662. (Use the
AdventureWorks database)
17. Write a query to display the details of those orders for which no discount was offered. (Use the
AdventureWorks database)
18. Write a query to display the sales order IDs and the credit card IDs of those cards which are
expiring in the year 2007. (Use the AdventureWorks database)
19. Write a query to display the average rate of the Australian Dollar, where the CurrencyRateDate is
July 1, 2004. (Use the AdventureWorks database)
No comments:
Post a Comment