Query and update databases using sql - find the balance for


Query and update databases using SQL

Task

Assignment tasks:

Write and run SQL statements to complete the following tasks

Part A - DML

1. Show the details of the products where the product code starts with '22'.

2. Display the vendor details from areacode 615.

3. Find the balance for customer 'George Williams'.

4. Show the number of products from each vendor and display the vendor code if there are more than 2 products from the same vendor.

5. Display the vendor code, name, phone number and the number of products from each vendor.

6. Find the customers whose balance is zero.

7. List the name of the customers for whom we have invoices.

8. Show the name and cus_code of the customers for whom we DO NOT have invoices.

9. Find out how many times a customer generated an invoice.

Part B - DDL

1. Add a new attribute email_addressvarchar(30) to the customer table.

2. Add email_address = '[email protected]' for customer '10016'.

3. Delete the record for employee Edward Johnson from EMP table.

You are required to submit:

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

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

Attachment:- Assessment item.rar

Solution Preview :

Prepared by a verified Expert
Computer Networking: Query and update databases using sql - find the balance for
Reference No:- TGS02772506

Now Priced at $40 (50% Discount)

Recommended (94%)

Rated (4.6/5)