Question: Chapter 5 ( A Guide to SQL ) Use the KimTay Pet Supplies database only. Case Exercises: Odd numbers, pg . 1 6 9 -
Chapter A Guide to SQL Use the KimTay Pet Supplies database only.
Case Exercises: Odd numbers, pg
KimTay Pet Supplies
Use SQL and the KimTay Pet Supplies database see Figure in Module to complete the
following exercises. If directed to do so by your instructor, use the information provided with the
Module Exercises to print your output or save it to a document.
For each invoice, list the invoice number and invoice date along with the ID first name, and
last name of the customer for which the invoice was created.
For each invoice placed on November list the invoice number along with the ID
first name, and last name of the customer for which the invoice was created.
For each invoice, list the invoice number, invoice date, item ID quantity ordered, and
quoted price for each invoice line that makes up the invoice.
Use the IN operator to find the ID first name, and last name of each customer for which as
invoice was created on November
Repeat Exercise but this time use the EXISTS operator in your answer.
Find the ID first name, and last name of each customer for which an invoice was not
created on November
For each invoice, list the invoice number, invoice date, item ID description, and category
for each item that makes up the invoice.
Repeat Exercise but this time order the rows by category and then by invoice number.
Use a subquery to find the sales rep ID first name, and last name of each sales rep who
represents at least one customer with a credit limit of $ List each sales rep only once
in the results.
Repeat Exercise but this time do not use a subquery.
Find the ID first name, and last name of each customer that currently has an invoice on
file for Wild Bird Food lb
List the item ID description, and category for each pair of items that are in the same
category. For example, one such pair would be item FS and item PF because the
category for both items is FSH
List the invoice number and invoice date for each invoice created for the customer James
Gonzalez.
List the invoice number and invoice date for each invoice that contains an invoice line for a
Wild Bird Food lb
List the invoice number and invoice date for each invoice that either was created for James
Gonzalez or that contains an invoice line for Wild Bird Food lb
List the invoice number and invoice date for each invoice that was created for James
Gonzalez and that contains an invoice line for Wild Bird Food lb
List the invoice number and invoice date for each invoice that was created for James
Gonzalez but that does not contain an invoice line for Wild Bird Food lb
List the item ID description, unit price, and category for each item that has a unit price
greater than the unit price of every item in category CAT. Use either the ALL or ANY
operator in your query. Hint: Make sure you select the correct operator.
For each item, list the item ID description, units on hand, invoice number, and quantity
ordered. All items should be included in the results. For those items that are currently not
on an invoice, the invoice number and quantity ordered should be left blank. Order the
results by item ID
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
