Question: Computing Inc., uses several database systems to conduct its computer hardware and software business operations. The following example is a subset of one of the
Computing Inc., uses several database systems to conduct its computer hardware and software business operations. The following example is a subset of one of the database systems. Customer table stores all the data related to customers. Prices in Product table reflect the current prices (unit prices) for products. The Transaction table keeps track of each customer's purchase and return history by storing product number, quantity, and the grand total he/she paid.
Sample data of Customer table

Data Type:
CustomerSSN: Text, CustomerName: Text, Job: Text, DateOfBirth: Date/Time, Zip: Number
Sample data of Product table

Data Type:
ProductID: Text, ProductName: Text, Quantity: Number, Price: Currency
Sample data of Transaction table

Data Type:
TransactionID: AutoNumber, ProductID: Text, CustomerSSN: Text, TransactionDate: Date/Time, TransactionQuantity: Number, GrandTotal: Currency
Please write SQL statements (one SQL statement for each question) to solve the following questions based on the sample database:
(4 points) List all the product ID, Name, Quantity and price.
(6 points) Update Tim Duncan's Zip code to 30075.
(6 points) List customers Name, Job title and zip code for all the customers whose birthday is after January 1, 1978.
(7 points) Tim Duncan bought one new 10GB Hard Drive (Product Id: 333224444) on 10/25/2018. Please add this new transaction in your database.
(9 points) List customer name, average purchase quantity (transaction quantity) and average purchase amount (i.e., grand total) for each customer (not including refunds).
(9 points) List all customers name and transaction counts for all customers who have made at least two transactions. (Transaction counts refer to how many transactions the customers have conducted. One transaction may include one or more than one transaction quantities).
(9 points) List all customers name and SSN for the customers who have made no transaction in the year 2000.
ob Zip CustomerSSN CustomerName 111-11-1111 Tim Duncan 222-22-2222 Deion Sanders SportsPerson 333-33-3333 Steve Young 444-44-4444David RobisonCEC 555-55-5555 Kobe Bryant DateOfBirth Consultant Programmer Wait 1/22/1978 7/28/1967 2/5/1965 8/3/1966 7/7/1980 30079 30080 30032 30050 30015
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
