0% found this document useful (0 votes)
18 views

ClassWork

Uploaded by

gashaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

ClassWork

Uploaded by

gashaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Customer Invoice LineItem Product

Customer_ID (PK) Int Invoice_NO(PK) Int Invoice_NO Part_NO(PK) Int


Name Customer_ID(FK) LineItem_NO Description
Address Invoice_Date Part_NO(FK) Cost
State SubTotal Qty Qty_OH
ZIP Tax Price Price
Phone Shipping

1. Strictly speaking, The Invoice table contains two fields it shouldn’t. Identify the
unnecessary fields.
2. Write an SQL statement to list all customers sorted by name.
3. Marketing want to target computer companies for a direct mailing. Write a query that lists
all companies with the words “Computer” or “Software” in their name.
4. Write an SQL statement to list all invoices for customers who are located in the state of
Colorado (CO).
Required output fields are: Customer ID, Customer Name, Invoice No, Sub-Total, Total.
Sort the results by City and then Zip code

You might also like