1. Get the order ID and unit price for each order by joining the Orders table and the Order Details table.
2. Get the order ID and first name of the associated employee by joining the Orders and Employees tables.
3. Get the employee ID and related territory description for each territory an employee is in, by joining the Employees, EmployeeTerritories and Territories tables.
4. Select all the different countries from the Customers table and the Suppliers table using UNION.
5. Select all the countries, including duplicates, from the Customers table and the Suppliers table using UNION ALL.
6. Using the Products table, get the unit price of each product, rounded to the nearest dollar.
7. Using the Products table, get the total number of units in stock across all products.
8. Using the Orders table, get the order ID and year of the order by using YEAR(). Alias the year as OrderYear.
9. Using the Orders table, get the order ID and month of the order by using DATENAME(). Alias the month as OrderMonth.
10. Use LEFT() to get the first two letters of each region description from the Region table.
2. Get the order ID and first name of the associated employee by joining the Orders and Employees tables.
3. Get the employee ID and related territory description for each territory an employee is in, by joining the Employees, EmployeeTerritories and Territories tables.
4. Select all the different countries from the Customers table and the Suppliers table using UNION.
5. Select all the countries, including duplicates, from the Customers table and the Suppliers table using UNION ALL.
6. Using the Products table, get the unit price of each product, rounded to the nearest dollar.
7. Using the Products table, get the total number of units in stock across all products.
8. Using the Orders table, get the order ID and year of the order by using YEAR(). Alias the year as OrderYear.
9. Using the Orders table, get the order ID and month of the order by using DATENAME(). Alias the month as OrderMonth.
10. Use LEFT() to get the first two letters of each region description from the Region table.
Hi,
ReplyDeleteDo you have Querying with Transact-SQL_Final 3 and 4 solutions? Thanks