Display the product name and quantity per unit


Assignment:

10 SQL Statements

Using the Northwind database, write a SQL SELECT statement that will retrieve the data for the following questions:

1. Display the character constant 'Greeting' with a column heading of 'Hello.'
o 1 row returned.

2. Display all data from the categories tables without specifying the names of the table columns. Order the results by CategoryName.
o 8 rows returned.

3. Display all employees' names, last name first, and then first name, hire date and home phone number. Order the results by employee name, last name first, and then first name.
o 9 rows returned.

4. Modify query 3 so that the column headings are as follows: 'Last Name,' 'First Name,' 'Date of Hire,' and 'Home Phone Number.'
o 9 rows returned.

5. Display the product name and quantity per unit, units in stock, and unit price for all products that have a unit price greater than $50. Order the results by unit price in descending order.
o 7 rows returned

6. Display the Name of all U.S.-based suppliers. Order the results by Name in ascending order.
o 4 rows returned.

7. Display the Order Id, ShipName, Order Date, and Freight of all orders that have a freight >/= 50 and

o 13 rows returned.

8. Rewrite query 6 to remove the use of BETWEEN and IN, and replace with the equivalent use of =, <, >, /= and AND and OR expressions.
o 13 rows returned.

9. Select the Employee's First Name, concatenated to the Last name, separated by a space. Call the column 'Employee Name,' the length of this employee name Length, the location of the first 'a' in the name 'A Location,' and the 5-9 characters from the name 'Substring.' Order the results by the Employee Name using the alias.
o 9 rows returned.

10. For each customer, show the number of orders placed, and the largest, smallest and total freight ordered. Only show those customers who have placed more than 15 orders.
o 9 rows returned.

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: Display the product name and quantity per unit
Reference No:- TGS01938876

Now Priced at $30 (50% Discount)

Recommended (94%)

Rated (4.6/5)