Display the product line id and the average standard price

Assignment Help PL-SQL Programming
Reference no: EM13837393

Purpose

The purpose of this exercise is to practice SQL queries on a single table.

Assignment

Perform the queries listed below on the PVFC11e database. Use MySQL Workbench and save all your queries to a single script (HW3_yourlastname.sql). Label each query with the comment containing the question number and your analysis, for example:

-- #1
-- Table:
-- Columns:
-- Condition:
SELECT ...

You can run an individual query by using on the toolbar or pressing CTRL-Enter with the cursor in that query.

1. Show all the products in product line 3 with a standard price below $400

2. Show how many different items were ordered on order number 1004.

3. List the employee names and ids of employees whose first name starts with an "R".

4. Show the average standard price for all items that contain the word "Natural"

5. List the name, city, state and postal code of all customers that live in Washington, Utah, and Colorado, sorted by zip code. (Be aware that "live in XX, XX, and XX" in English translates to "live in XX, XX, or XX" in MySQL).

6. For every product that has been ordered, display the product ID and the total quantity ordered (label this result TotalOrdered). List the least popular product first and the most popular last.

7. Display the product line ID and the average standard price for all products in each product line.

8. For each customer, list the Customer ID and the total number of orders placed.

9. Display the product ID and the number of orders placed for each product. Show the results in decreasing order by the number of times the product has been ordered, and label result column NumOrders.

10. For each customer who had exactly one order, list the Customer ID and the number of orders placed.

11. For each date, list the total number of orders placed on that date, sorted by date.

12. For each date, list the total number of orders placed on that date, sorted by number of orders with the largest numbers first.

13. For each date, list the total number of orders placed on that date, sorted by number of orders with the largest numbers first. If there are multiple dates having the same number of orders, then list the most recent dates first.

Reference no: EM13837393

Questions Cloud

How this profile demonstrates attitudes and beliefs : Explain how this profile demonstrates attitudes and beliefs that relate to your product or service
Design simplified and shared dynamic ram controller circuit : Design a simplified and shared dynamic RAM controller circuit which has the following specifications. The inputs to the circuit are a 20 bit address (ADDRIN), a read signal (RD), a write signal (WR), and an enable signal (ALE).
Discuss about secrets of the brain : Normal 0 false false false EN-US X-NONE X-NONE Secrets of the brain
What is the time it takes for the stone to reach : A stone is dropped from 448 m.  What is the time it takes for the stone to reach the ground (without air resistance)?
Display the product line id and the average standard price : SQL queries on a single table. Show how many different items were ordered on order number 1004. List the employee names and ids of employees whose first name starts with an "R".
What should be the criteria for success or failure : Should the new multipack carrier be tested? If a test is judged necessary, what should be the criteria for success or failure
When moving up along the production function : When moving up along the production function, the marginal product of capital will:
Unrecorded foreign asset holdings : The fact that the United States made large valuation gains on average over the past 30 years means that the rest of the world as a whole made equally large valuation losses. After all, this is a zero sum game. The United States has large unrecorde..
In the solow growth model-human capital will increase : In the Solow growth model, human capital will increase if (choose the best answer):

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Assignment on aggregate functions

After reviewing and completing the Unit 1 Guided Practice 2, I suggest that you review all tables using the Object Browser area of the SQL Workshop associated with the scenarios below, as well as field data types and data (case sensitivity) before..

  Design new transaction by sql statements

Code SQL statements to update view as follows: change spelling of Mark Tobey to Mark Toby. Design new Transaction for Mark Toby. Suppose you have essential transaction, work, and customer data.

  Write a select statement that returns

Write a Select statement that returns four columns from the Invoices table, named Number, Total, Credits, and Balance

  Attempt the following1 run the lab0301sql script in the

attempt the following1. run the lab0301.sql script in the attached file to create the salhistory table. 2. display the

  Prior to the adoption of sql

What factors influenced your decision - Explain a situation where you would consider using the other option.

  Assignment related to products table in sql

Write a SELECT statement that returns these columns from the Products table: The ListPrice column, The DiscountPercent column

  Write a pl-sql block to select the name of the employee

Write a PL/SQL block to select the name of the employee with a given salary value. You will be using the MESSAGES table that was created for a previous assignment.

  Perform the subsequent queries on the array

Use LINQ to select the PartDescription and Quantity and sort the results by Quantity - Use LINQ to select from each Invoice the PartDescription and the value of the Invoice.

  Writing and execuinge sql command

The table name will be METALS and will be used to store description of various metals. Following offers some additional direction on how table must be created.

  What does sql mean and what can you do with sql

Now we're getting to some exciting stuff - SQL and queries! We have *touched on it* earlier and now this week it will be the primary focus of this discussion topic. So what is SQL? What does SQL mean and what can you do with SQL

  Let the user type his first and last name

The program should let the user type his first and last name.

  Consider the following set of database tables the diagram

consider the following set of database tables. the diagram shows a database made up of 6 tables with all primary keys

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