Write and Run SQL Statements to Complete the Following Tasks

Write and run SQL statements to complete the following tasks


Show sums of line totals for each invoice.
Locate the record in the vendor table that does not have a value for the attribute V_STATE
Find the customers whose balance is greater than 200 but less than 300.
Using natural join and having, list the customers whose invoice total is greater than 200
Show the names of the customers for whom we have invoices.
Using natural join and having, list the customers whose invoice total is greater than the average
Show the names of the customers for whom we DO NOT have invoices.
Using natural join and having, list the customers whose invoice total is the maximum.
List the first name and last name of the customers and how many times a customer has generated an invoice.
List all purchases by customer 10018.
List the names of the vendors who provided products.
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 SQLite3 Command Line and pasted into your submission file. If you type .echo on at the SQLite3 Command Line, SQLite will output your SQL statement with the results of the query making it easy to copy and paste both.
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.


Rationale
This assessment aligns with the following subject outcomes:

be able to critically analyse and modify an existing database design to meet new business requirements;


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.

Solution

High quality administrations being provided by assignmenthelp4me make it one of the highest rated online task help websites.

ORDER NOW

Assignmenthelp4me.com is online assignment assistance Provider Company with a difference. As we are in this field for several years, we have matured our processes over the period of time, to ensure delivery of high quality assignments with consistency. Our success in touching high quality levels and positive feedback from the customers has given us confidence to expand ourselves into new geographies. As a result, we have been innovative and creative in getting clients’ delight and establishing good customer relationship.