Solved by: AllAcademicHelp.com
Assessment item 4back to topQuery databases using SQLValue: 15%Due Date: 02-Oct-2019Return Date: 28-Oct-2019Submission method options: Alternative submission methodTaskback to top
Task: Complex SQL Queriesback to topNOTES• This assignment requires you to use SQLite to complete the tasks listed below.• For guidance on how to install SQLite, watch this short YouTube video: https://www.youtube.com/watch?v=9ynCDVg54H0• For guidance on how to create tables using SQLite, watch this short YouTube video: https://www.youtube.com/watch?v=kij5lPw0F-o• Typing the SQL statements or the results is NOT acceptable.InstructionsFrom Resources under Main Menu in Interact 2 go to Assignment 4 FolderCopy sqlite3.exe file from the Assignment 4 Folder into a folder in your machine
Copy a4.txt from the Assignment 4 Folder into the folder in your machine where your SQLite file is located
From the SQLite Command Prompt execute the a4.txt script. To do this, at the SQLite Command Line type .read a4.txt [to create the tables you will use to answer this assignment’s questions]
At the SQLite Command Line type .headers on
At the SQLite Command Line type .mode column
Write and run SQL statements to complete the following tasks (Each Query : 1.5 (0.75 query+ 0.75 for screenshot) Marks)
Show sums of line units for each invoice.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 24 but less than 76.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 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.Show the details of the employees who are located in area code 615.Using inner join, list the details of the products whose line price is greater than 99.
You are required to submit:
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. 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.
Rationaleback to topThis assessment task will assess the following learning outcome/s:• be able to use complex SQL commands to query a database.
Let’s block ads! (Why?)
READY TO PLACE AN ORDER