Find the customers whose balance is greater

Assignment Help PL-SQL Programming
Reference no: EM131607034

Assessment: Query and update databases using SQL

Alternative submission method

Task

Instructions
From Resources under Main Menu in Interact 2 go to Assignment 5 Folder

The ‘assignment5' database file will be made available on Interact2 Resources under Assessments folder.
Use MySQL software to complete this assignment.

Follow the instructions on ‘how to import a database into MySQL': your teacher will also demonstrate this during class.

Use this (imported) database ‘assignment5' to complete your assignment using MySQL.

A choice of another software may be possible after consultation with your teacher.

Write SQL statements to answer the following questions from the ‘assignment5' database file.

1. Show sums of line totals for each invoice.

2. Locate the record in the vendor table that does not have a value for the attribute V_STATE

3. Find the customers whose balance is greater than 200 but less than 300.

4. Using natural join and having, list the customers whose invoice total is greater than 200

5. Show the names of the customers for whom we have invoices.

6. Using natural join and having, list the customers whose invoice total is greater than the average

7. Show the names of the customers for whom we DO NOT have invoices.

8. Using natural join and having, list the customers whose invoice total is the maximum.

9. List the first name and last name of the customers and how many times a customer has generated an invoice.

10. List all purchases by customer 10018.

11. List the names of the vendors who provided products.

12. Using inner join, list the details of the products which sold more than 10 units.

You are required to submit:

1. The SQL statements for each query, which should be copied from your MySQL Workbench and pasted into your submission file. The screenshots of the results of the SQL statements which are to be copied from your MySQL Workbench and pasted into your submission file immediately after you execute the SQL query.

2. The screenshots of the results of the SQL statements which are to be copied from your SQLite3 Command Line and pasted into your submission file immediately after you execute the SQL query. If you used an output file please submit only the output file.

Reference no: EM131607034

Questions Cloud

Find the maximum value of the y-coordinate on the limac : For what values of ? on the polar curve r = ?, with 0 = ? = 2p, are the tangent lines horizontal? Vertical?
The call is normally a out-of-the-money call : The covered call position is a combination of a long stock position and a long call position, and the call is normally a out-of-the-money call."
Is a price ceiling set above or below the market price : Is a price ceiling set above or below the market price? How could you explain this situation to the museum director?
Define-the equation of a circle in polar coordinates : Any polar curve that is symmetric about both the x and y axes must be a circle, centered at the origin.
Find the customers whose balance is greater : Show sums of line totals for each invoice and Locate the record in the vendor table that does not have a value for the attribute V_STATE
Yield to maturity and yield to call : What is the yield to maturity? Which yield might investors expect to earn on these bonds? Why? What is the yield to call if they are called in 5 years?
Find the mass of a rod : Find the mass of a rod of length 10 cm with density d(x) = e-x gm/cm at a distance of x cm from the left end.
Explain discernable point that might be either defended : Have you written an academic essay before? Under what circumstances? What did you create? How did you come up with your ideas
Define and give an example in our current economy : Define and give an example in our current economy. Do you think luxury goods have more elastic or inelastic demand? Explain in 150 words.

Reviews

len1607034

8/21/2017 5:10:43 AM

Requirements Either submit your assignment as a PDF or a Word document. Don't use any other file formats. Please include your student ID, name and subject code in your submission.

len1607034

8/21/2017 5:09:32 AM

Requirements Either submit your assignment as a PDF or a Word document. Don't use any other file formats. Please include your student ID, name and subject code in your submission.

len1607034

8/21/2017 5:09:21 AM

Marking criteria Each task is worth 1.25 marks. The marking criteria for this assignment is: Criteria HD DI CR PS be able to critically analyse and modify an existing database design to meet new business requirements; SQL syntax returns all attributes that meet the business requirement from the tables that hold the data and applies the correct restrictions to retrieve the required information. SQL syntax returns all attributes that meet the business requirement from the tables that hold the data with minor omissions and applies appropriate restrictions to retrieve the required information. SQL syntax returns key attributes that meet the business requirement from the tables that hold the data and applies relevant restrictions to retrieve the required information. SQL syntax returns key attributes that meet the business requirement from the tables that hold the data but the restrictions applied to retrieve the required information contain minor errors.

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