Write SQL statements, homework help

User Generated

zbunzznqfnzv

Programming

Description

Task

Write SQL statements to answer the following questions from the ‘assignment5’

Database: Answer all questions

  1. List all the record/s in the vendor table that do not have a value for the attribute V_STATE.
  2. Find the customers whose balance is greater than 250 but less than 400.
  3. Create a query based on invoice table to show a 15% increase on tax in a new column.
  4. Show the first and last names of the customers for whom we have issued invoices.
  5. Show the CUS_CODE of the customers for whom we DO NOT have invoices.
  6. Show the names of the customers for whom we DO NOT have invoices
  7. Find out how many times a customer generated an invoice – make sure the counted column heading reads “Invoices_generated” .
  8. 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” .
  9. 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,.
  10. Add a new attribute called ‘email_address’ to ‘emp’ table and use data type and length ‘VARCHAR-20’.
  11. 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.
  12. 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.

Unformatted Attachment Preview

Assignment 3 - Presentation Install MySQL Workbench on your PC Please read instructions in the subject outline Assignment 3 - Presentation of queries Step 1 After getting the correct answer to each question; 1. Copy and paste your SQL code into a Word document for each question, as the example below: Q-1: SELECT event_code FROM prize WHERE place=1 AND prizemoney BETWEEN 100 AND 200; SQL Help, by: Antoinette Cevenini - 2016 Presentation of queries step 2 Continued … 2. Do a screenshot (ALT+PRTSCN) of your SQL code and paste under the copied SQL code for each question into a Word document, as the example below: Q-1: SELECT event_code FROM prize WHERE place=1 AND prizemoney BETWEEN 100 AND 200; Step 2- The screenshot SQL Help, by: Antoinette Cevenini - 2016 Presentation of queries step 3 Continued … 3. Copy the results only then paste under the screenshot in your Word document for each question, as shown below: Q-1: SELECT event_code FROM prize WHERE place=1 AND prizemoney BETWEEN 100 AND 200; event_code 0101 0103 Step 3- The results SQL Help, by: Antoinette Cevenini - 2016 Presentation of queries- complete for each question Q-1: SELECT event_code FROM prize WHERE place=1 Step 1- The code AND prizemoney BETWEEN 100 AND 200; Step 2- The screenshot event_code 0101 0103 Step 3- The results SQL Help, by: Antoinette Cevenini - 2016
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello how...


Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags