Q1. Select the quantity per unit for all products in the Products table.
Q2.Select the unique category IDs from the Products table.
Q3. Select the names of products from the Products table which have more than 20 units left in stock.
Q4. Select the product ID, product name, and unit price of the 10 most expensive products from the
Q5. Select the product ID, product name, and quantity per unit for all products in the Products table.
Q6. Select the product ID, product name, and unit price of all products in the Products table. Sort your results by number of units in stock, from greatest to least.
Skip the first 10 results and get the next 5 after that
7. Use STR and CONVERT where appropriate to display the first name, employee ID and birthdate (in ISO 8601 format) for each employee in the Employees table.
Each result should be a single string in the following format, where each <<value>> is replaced by the appropriately converted value:
<<FirstName>> has an EmployeeID of <<EmployeeID>> and was born <<BirthDate>>
Q8. Select from the Orders table.
The first column of your result should be a single string in exactly the following format:
<<ShipName>> is from <<ShipCity or ShipRegion or ShipCountry>>
If there is no ShipCity, then you should select ShipRegion, and if there is no ShipRegion you should select ShipCountry.
Q9. Select the ship name and ship postal code from the Orders table. If the postal code is missing, display 'unknown'.
Q10. Using the Suppliers table, select the company name, and use a simple CASE expression to display 'outdated' if the company has a fax number, or 'modern' if it doesn't. Alias the result of the CASE expression to Status.
Q2.Select the unique category IDs from the Products table.
Q3. Select the names of products from the Products table which have more than 20 units left in stock.
Q4. Select the product ID, product name, and unit price of the 10 most expensive products from the
Q5. Select the product ID, product name, and quantity per unit for all products in the Products table.
Q6. Select the product ID, product name, and unit price of all products in the Products table. Sort your results by number of units in stock, from greatest to least.
Skip the first 10 results and get the next 5 after that
7. Use STR and CONVERT where appropriate to display the first name, employee ID and birthdate (in ISO 8601 format) for each employee in the Employees table.
Each result should be a single string in the following format, where each <<value>> is replaced by the appropriately converted value:
<<FirstName>> has an EmployeeID of <<EmployeeID>> and was born <<BirthDate>>
Q8. Select from the Orders table.
The first column of your result should be a single string in exactly the following format:
<<ShipName>> is from <<ShipCity or ShipRegion or ShipCountry>>
If there is no ShipCity, then you should select ShipRegion, and if there is no ShipRegion you should select ShipCountry.
Q9. Select the ship name and ship postal code from the Orders table. If the postal code is missing, display 'unknown'.
Q10. Using the Suppliers table, select the company name, and use a simple CASE expression to display 'outdated' if the company has a fax number, or 'modern' if it doesn't. Alias the result of the CASE expression to Status.
No comments:
Post a Comment