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

  Write a select statement

Write a Select statement that determines whether the PaymentDate column of The Invoices table has any invalid values.

  Population of alligators on the kennedy space

In 1970 the population of alligators on the Kennedy Space Center grounds was estimated to be 300. In 1980 the population had grown to an estimated 1500. Using the Malthusian law for population growth, estimate the alligator population on the Kenne..

  Write a select statement that returns four columns

Write a SELECT statement that returns four columns from the Products table: ProductCode, ProductName, ListPrice, and DiscountPercent. Then, run this statement to make sure it works correctly.

  Write sql queries to produce list occurrences of adv pastels

Write SQL queries to produce the List all occurrences of Adv. Pastels. Include all associated fields for each occurrence of the class.

  Prepare a sql statement to use joining the tables

Write a SELECT statement that joins the Customers, Orders, OrderItems, and Products tables.

  Add a new parts record and delete an existing parts record

Add a new parts record, delete an existing parts record, and update an existing parts record.

  Calculating a shopper total number of orders

Calculating a Shopper's Total Number of Orders Another commonly used statistic in reports is the total number of orders a shopper has placed. Follow these steps to create a function named NUM_PURCH_SF that accepts a shopper ID and returns a shopper..

  Write a program in towers of hanoi

How to write a program in towers of hanoi using pl/sql language

  Write a queries for a list of all clubs and their details

Write a queries for A list of all clubs and their details. Members of the clubs attending the meeting then apply to take part in their chosen events. Forms are available at each club for this purpose.

  Write the select statement to show all records

Create a stored function called get_customer_balance which will return a customer's balance from the membership table by passing in a membership number and write a single SELECT statement to show the customer balance for member 102 by using the get..

  Demonstrate use of sql to perform olap operations

DS 715 - Assignment - Demonstrate use of SQL to perform OLAP operations; Estimated time to complete: 40 min reading +45-50 min.

  Write a iterative function that returns the summation

Write and test functions that return summation of all the numbers (items) in the list. Write a recursive function that returns the summation of all the numbers in the list.

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