WorksheetsSQL Queries
Total questions: 10
Worksheet time: 20mins
From the items_ordered table, select a list of all items purchased for customerid 10449. Display the customerid, item, and price for this customer.
(a)
Select all columns from the items_ordered table for whoever purchased a Tent
(a)
Select the customerid, order_date, and item values from the items_ordered table for any items in the item column that start with the letter “S”.
(a)
Select the distinct items in the items_ordered table. In other words, display a listing of each of the unique items from the items_ordered table.
(a)
Select the lastname, firstname, and city for all customers in the customers table. Display the results in Ascending Order based on the lastname.
(a)
Select the item and price for all of the items in the items_ordered table that the price is greater than 10.00. Display the results in descending order based on the price.
(a)
Select the item and price of all items that start with the letters ‘S’, ‘P’, or ‘F’
(a)
Select the date, item, and price from the items_ordered table for all of the rows that have a price value ranging from 10.00 to 80.00.
(a)
Select the firstname, city, and state from the customers table for all of the rows where the state value is either: Arizona, Washington, Oklahoma, Colorado, or Hawaii.
(a)
Select the customerid, firstname, lastname, order_date, item, and price for everything each customer purchased in the items_ordered table.(HINT : use ALIASES c for customer and i for items_ordered)
(a)
