NOte: All the Statements and their result should be screenshot from Workbench. Check the file named "Assignment SQL - Presentation.pdf" for presentation requirements. I have attatched File named "Assignment5" for which SQL statement are to be written. Check Files for more details. Write SQL statements to answer the following questions from the ‘assignment5’. Database: Answer all questions List all the record/s in the vendor table that do not have a value for the attribute V_STATE. Find the customers whose balance is greater than 250 but less than 400. Create a query based on invoice table to show a 15% increase on tax in a new column. Show the first and last names of the customers for whom we have issued invoices. Show the CUS_CODE of the customers for whom we DO NOT have invoices. Show the names of the customers for whom we DO NOT have invoices Find out how many times a customer generated an invoice – make sure the counted column heading reads “Invoices_generated” . List the names of the customers and how many times a customer generated an invoice – make sure the counted column heading reads “N_Of_Invoices” . Find the customers whose last name is either Dunne, Orlando or Brown and live in area 615, sort in alphabetical order by the CUS_LNAME,. Add a new attribute called ‘email_address’ to ‘emp’ table and use data type and length ‘VARCHAR-20’. Add a new row/record to the `customer` table to include your actual student ID in the CUS_CODE, your lastname as the CUS_LNAME` and your firstname as CUS_FNAME. Add any other details in the other fields. Delete all the vendors in the FL state. Rationale This assignment will assess your knowledge and ability to use SQL to create database tables. It will also test your ability to write both simple and complex queries given a set of results that are required and to the run those queries to return the requested data. Marking criteria The following criteria will be used to assess Assessment Item 4: SQL Queries - DML: All SQL code in MySQL must be copied and pasted into your submission file. Outputs of each query also should have shown followed by the query. HD DI CR PS FL Accurate and elegant SQL that answers all parts of the question. SQL code copied from MySQL as well as a screen shot of code and results into the submission file Good SQL that answers most parts (75% ~ 85%) of the question. SQL code copied from MySQL as well as a screen shot of code and results into the submission file Satisfactory SQL that answers some parts (65% ~ 75%) of the question. SQL code copied from MySQL as well as a screen shot of code and results into the submission file Partial SQL that answers a small part (50% ~ 65%) of the question. SQL code copied from MySQL as well as a screen shot of code and results into the submission file Incomplete or irrelevant SQL that does not answer the question (
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here