This assignment requires you to write SQL commands to complete the tasks listed below.
Typing the SQL statements or the results is NOT acceptable.
This assignment's tables can be located from the Resources under Main Menu in Interact 2 (Assignment 5 Folder)
Instructions
Write and run SQL statements to complete the following tasks
Show the details of the vendors who are located in area code 615.
Show the details of the products that do not have a value for the attribute v_code.
Show the details of the invoices whose subtotal is greater than 25 but less than 75.
Show the details of the invoice who has the minimum subtotal.
Show the codes and names of the vendors who supplied products.
Using EXCEPT show the codes of the vendors who did not supply any products.
Using ‘NOT IN’ show the codes and names of the vendors who did not supply any products.
List the codes of vendors and the number of products each vendor has supplied, i.e. vendor XXX has supplied xxx products, and vendor YYY has supplied yyy products etc.
List the names and codes of vendors and the number of products each vendor has supplied, i.e. vendor XXX has supplied xxx products, and vendor YYY has supplied yyy products etc.
Add a new attribute (field) status varchar(6) to the EMP table.
Update status for employee '100' to 'Temporary'.
Using inner join, list the details of the products whose line price is greater than 100.
You are required to submit:
1. The SQL statements for each query, which should be copied and pasted into your submission file.
2. The screenshots of the results of the SQL statements should be copied and pasted into your submission file immediately after you execute the SQL query.
Rationale
back to top
This assessment task will assess the following learning outcome/s:
be able to implement a database design using Structured Query Language (SQL).
be able to query a database using SQL.
Marking criteria and standards
back to top
Each task is worth 1.25 marks. The marking criteria for this assignment is:
Criteria
HD
DI
CR
PS
be able to implement a database design using Structured Query Language (SQL).
be able to query a database using SQL.
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.
Requirements
back to top
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.
GET ANSWERS / LIVE CHAT