Question: 1. Use the sample database (four tables Invoice, Product, LineItem, and Customer) in Page W1022 of CH24 to answer the following questions: a. Give a
1. Use the sample database (four tables Invoice, Product, LineItem, and Customer) in Page W1022 of CH24 to answer the following questions:
a. Give a SQL query that lists all customers in California or Nevada.
b. Give a SQL query that lists all products that have been purchased by a customer in California.
c. Give a SQL query that lists all line items that are part of invoice number 11731.
d. Give a SQL update statement that raises all prices by ten percent.
W1022 Chapter 24 Relational Databases Invoice Customer Number CodeQuantity DECDAL(102) CHARC 3173 3176 3175 257-535 43-119 116 061 116 061 643-119 1733 11731 Price DECIMALC0, 2) 24.95 WCHAR (40) 11733 116-064 Hair dryer 643-119 Car vacuum 19.99 Customer City 3175 Sam Small Applia 100 Mai SeAnyton 3176 Electionis Ualimited 1 Liberty Ae Pleasatville ML Figure 8 A Sample Database 24.2.1 Simple Queries lUse the snu vuIn SQL, you use tbe SELECT cosue querics Foreample, thend to select all data trom the Customer table is a darabase. SELECT FRON Custeer The resultis City 3175 S 100 Main SueeAyoa CA 98765 3176 Electonics 1175 Libety Ae Pleasantville 5066
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
