Delete the employee leighla genkazi from the emp table -


Query and update databases using SQL

This assignment requires you to use SQLite to complete the tasks listed below. Student can also use SQL Workbench or another software (if they are familiar) to complete the tasks.

For guidance on how to install SQLite, watch this short YouTube video: How to download and install SQLite by Yeslam Al-Saggaf

For guidance on how to create tables using SQLite, watch this short YouTube video: How to import a table into an SQLite database by Yeslam Al-Saggaf

Write and run SQL statements to complete the following tasks

Part A - DML

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 $300 but less than $400.

Show the names of the customers for whom we have invoices.

What is the max balance?

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".

Part B - DDL

Add a new row/record to the `customer` table to include your actual student_ID in the CUS_CODE, your last_name as the

CUS_LNAME` and your firstname as CUS_FNAME. Add any other details of your choice in all the other fields.

Add a new attribute (field) credit_history VARCHAR(6) to the customer table.

Update credit_history for customer '10011' to 'Bad'.

Delete the employee Leighla Genkazi from the EMP table.

Add a new attribute called ‘email_address' to ‘emp' table with data type and length ‘VARCHAR(20).

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.Ifyoutype .echoon at the SQLite3 Command Line, SQLite will output yourSQL 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.

Requirements

1 Either submit your assignmentasa PDFora Word document.

2 Don't use any other file formats.

3 Please include your student ID, name and subject code in your submission.

Referencing: APA

Solution Preview :

Prepared by a verified Expert
Database Management System: Delete the employee leighla genkazi from the emp table -
Reference No:- TGS02632355

Now Priced at $30 (50% Discount)

Recommended (93%)

Rated (4.5/5)