Display all product columns for products

Assignment Help PL-SQL Programming
Reference no: EM13839911

Query: For each customer, show the number of orders placed, and the largest, smallest and total freight ordered. Only show those customers whose total freight is greater than $1000.

Query: Display all product columns for products that are red and black and have a list price greater than or equal to $400 and less than or equal to $800. Use the keywords BETWEEN and IN.

Query: Rewrite query #9 to remove the use of BETWEEN and IN, and replace with the equivalent use of =, <, >, /= and AND and OR expressions.

Write SQL statements that will retrieve the following data from a database, using Subqueries and Joins. Using the AdventureWorksLT2012 database, write a SQL SELECT statement that will retrieve the data for the following questions:

Query 1: For each order, display the Customer's Company Name, Phone, and the Email for the customer who placed the order. Include the Sales Order ID, Order Date and the Due Date. Sort the results by Company Name in ascending order.

Query 2: For each order, list the Sales Order ID, Order Date, Product Name, sales order Unit Price, Quantity Ordered. Sort the data by the Sales Order ID and then the Product Name.

Query 3: Modify the first query to list the same fields, but include all customers even if they have not placed an order.

Query 4: List all product categories (including product categoryID and name), the number of products in each category as well as the average list price of the products in that category. Display those categories that have 5 products or less including categories that have no products assigned to it. Name the count column ‘ProductCount' and the average column ‘Average List Price'. Sort the results by the product count in descending order.

Query 5: Display the Product Name, and List Price of all products that have a list price larger than the Cable Lock product. Sort the results by List Price in descending order. Note: use of a subquery is required.

Query 6: Display the Customer Name of all customers who have placed orders between May 2004 and September 2004. Sort the results by Company Name in ascending order. The name should appear once on the list.

Query 7: Display the ProductID, name and weight of all products that weigh less than ‘Front Brakes'. Sort by the results by weight in descending order. Use a subquery.

Query 8: List the Product Name and ProductID for all products that have not sold. Use a sub query.

Query 9: Display the Customer ID and Customer Company Name for all customer's shipping addresses in the United States.

Query 10: Display the Sales OrderID and Total Due for all orders where the Total Due is larger than the average Total Due for all orders.

Reference no: EM13839911

Questions Cloud

Evaluation of jobs and job structure : Evaluation of Jobs and Job Structure
What is the ascii collating sequence : Which standard C++ library function allows you to paste one string onto the end of another. What must you be careful of when using this function
Design a drainage and pumping system to deal with mine water : You are required to design a drainage and pumping system to deal with the mine water for the next 10-15 years based on the data in the following sections.
Discussion on the right to carry guns on college campuses : Discussion on the Right to Carry Guns on College Campuses
Display all product columns for products : Display all product columns for products that are red and black and have a list price greater than or equal to $400 and less than or equal to $800. Use the keywords BETWEEN and IN.
What is an annotated bibliography : What is an annotated bibliography? A description/summary of the central theme of the work. A mention of the intended audience, Comments about the work's quality and scope,and the relevance of the work as it pertains to your topic
Conduct a swot analysis on the case study company : Conduct a SWOT Analysis on the case study company's current lack of strategic control. Create a case study analysis focusing on the company's challenge relative to strategic control through a balanced scorecard and implementation
What is the interest rate implied in the lease : Describe how the asset and liability sections of Mr.Speakers' balance sheet would change if the FASB passed and implemented the exposure draft on lease accounting prior to 1/1/2016 - What is the interest rate implied in the lease and prepare ALL ne..
Integrate the readings-writing assignments : The Final Paper presents an overview of the topics of the course framed within one of the people groups studied, demonstrating the student's' ability to integrate the readings, writing assignments, and key term into a seminal project.

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