Write the needed sql to list all product names

Assignment Help PL-SQL Programming
Reference no: EM131180582

SQL Database Assignment

Download, unzip, and attach (to SQL Server) the sample Northwind Traders SQL Server database found in the Week 10 module area. Write the needed SQL for each of the following situations and upload your completed document when done for grading.

1. Write the needed SQL to list all product names (and only product names) from the Products table that fall into the category of "condiments." The list of products should be in ascending order.

2. Write the needed SQL to update the description of the "Produce" category from "Dried fruit and bean curd" to "Dried fruit, bean curd, and soy."

3. Write the needed SQL to produce a list that will contain the following columns:

OrderID, OrderDate, RequiredDate, ShippedDate, Quantity, UnitPrice, ProductName

The list should contain only the orders that were placed in April 1997 (the entire month). The list should be in ascending order by OrderDate and then Quantity.

4. Write the needed SQL to update all suppliers in Germany that do not have a fax number by setting their fax number to ‘N/A.'

5. Write the needed SQL to produce a list with the following columns.

CustomerID, CompanyName, OrderID, OrderDate, Order Item Count

The list will contain (as the last column) the total number of order items per order. Display the results in ascending order by company name and order id. Here is an example:

6. Write the needed SQL to delete all order information for customer "QUICK-Stop."

7. Write the needed SQL (DDL) to perform the following changes in the Northwind database. Your answers under each of the following should show the SQL DDL you need to perform each task.

7a. Remove columns "HomePhone" and "Extension" from the Employees table.

7b. Create a new table called PhoneNumber with the following schema (column name, data type, nullability):

PhoneNumber_ID int not null PK
PhoneNumber_AreaCode char(3) null
PhoneNumber_Prefix char(3) not null
PhoneNumber_Extension char(4) not null

7c. Write the needed SQL DDL to set up a relationship between Employees (parent table) and PhoneNumber (child table). This is a one-to-many relationship (one employee can have many phone numbers).

7d. Write the needed SQL DDL to create a non-unique non-clustered secondary index on the "LastName" column in the Employees table.

Attachment:- Northwin_Traders_Database.zip

Reference no: EM131180582

Questions Cloud

Book value balance sheet : Bolster Foods’ book value balance sheet shows a total of $25 million long-term debt with a coupon rate of 8.5%. The bond has 15 years remaining, and it’s currently trading at 120% of the face value. The firm issued $100 million worth of common stock ..
Disadvantages of compensating salespeople by salary : What are the advantages and disadvantages of compensating salespeople by salary? By commissions?- What do you think is an acceptable compromise?
Breakeven between purchasing and manufacturing the mechanism : Toys R Us can purchase mechanisms to be used in making certain toys for $60 each. They can manufacture their own mechanisms for $7000 per year fixed cost plus $35 for each mechanism, provided they purchase a machine for $100000 that will have a 10 ye..
Find the terminal stock price using benchmark pe ratio : In practice, a common way to value a share of stock when a company pays dividends is to value the dividends over the next five years or so, then find the “terminal” stock price using a benchmark PE ratio. Suppose a company just paid a dividend of $1...
Write the needed sql to list all product names : Write the needed SQL to list all product names (and only product names) from the Products table that fall into the category of "condiments." The list of products should be in ascending order.
What additional factors should moore evaluate : What suggestions can you offer that would help Moore make this decision? - How could Moore go about determining the cost-effectiveness of this strategy?
Discuss any educational requirements of the job : Explain what the career requires you know about the legal system. Discuss any educational requirements of the job. Describe what an undergraduate psychology student may have to do to become eligible for this job.
Retained earning at the year end : What are the earnings per share (EPS) for a company that earned Rs. 100,000 last year inafter-tax profits, has 200,000 common shares outstanding and Rs. 1.2 million in retained earning at the year end?
Increasingly choosing to self­ fund their health plans : Which of the is NOT a reason that that large firms are increasingly choosing to self ­fund their health plans:

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd