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

  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