MIS 180 SQL Chapter 2-4 Exam Questions With
Complete Answers 100% Pass
What manufacturers have had products sold in June of 2015? Only show manufacturer names.
- ANSWER Select Distinct ManufacturerName
From SimplifiedSales
Where month(SaleDate) = 6 and Year(SaleDate) = 2015
What were the category, productname, color and item size of products manufactured by
Converse and sold in 2014? - ANSWER Select Distinct Category, ProductName, Color, Itemsize
From simplifiedsales
Where ManufacturerName = 'Converse'
And Year(SaleDate) = 2014
Give all data for sales of more than $130 - ANSWER Select * From SimplifiedSales Where Price
> 130
List all the information for each sale made to customer Stephen Liddle. - ANSWER Select *
From SimplifiedSales
Where Firstname = 'Stephen'
And Lastname = 'Liddle'
,What are the product names of boots size 12 and above sold in 2014? (Category names are
not capitalized.) - ANSWER Select Distinct productname
From SimplifiedSales
Where Category = 'boots' And itemsize >= 12 And Year(SaleDate) = 2014
What were the sales prices of the product named hampton boots that have been sold?
(Product names are not capitalized in the database.) Return only the sales prices. - ANSWER
Select Price
From SimplifiedSales
Where ProductName = 'hampton boots'
Which products were sold on the second of January of 2014? Only show product names. -
ANSWER Select Distinct ProductName
From SimplifiedSales
Where SaleDate = '2014-1-2'
Give a list of customer's last and first names with the product names who have purchased
boots priced $10 and under. (Category names are not capitalized.) - ANSWER Select Distinct
lastname,
firstname,
productname
From SimplifiedSales
Where Category = 'boots'
,And Price <= 10
Give first and last names of customers who have made purchases costing $120 or more but
less than $130. Only show customer names. Do not use BETWEEN for this query. - ANSWER
Select Distinct Firstname,
Lastname
From SimplifiedSales
Where Price >= 120
And Price < 130
What are the colors of sold products whose price is more than $100? Show only colors. -
ANSWER Select Distinct Color
From SimplifiedSales
Where Price > 100
CHAPTER 2 QUERY SET #2 - ANSWER
Give an alphabetical list of manufacturers who have had products sold in June of 2015? Only
show manufacturer names. - ANSWER SELECT Distinct ManufacturerName
FROM simplifiedsales
WHERE month(SaleDate) = 6 and year(saledate) = 2015
ORDER BY ManufacturerName
, What are the names (first and last) of customers who have made purchases in June or
December of 2015? - ANSWER Select Distinct Firstname,
Lastname
From SimplifiedSales
Where (month(SaleDate) = 6
Or month(SaleDate) = 12)
And Year(SaleDate) = 2015
Show all of the prices at which products manufactured by Keds have been sold. Sort it in
descending order by price. (Manufacturer names are capitalized in the database.) Only show
product names and prices. - ANSWER Select Distinct Productname,
Price
From SimplifiedSales
Where ManufacturerName = 'Keds'
Order by Price DESC
What are the prices of blue sandals and green sandals that have been sold? Show the various
prices by color sorted with blue sandals first and then by descending price. (Colors are
capitalized in the database.) Show only colors and prices. - ANSWER Select Distinct Color,
Price
From SimplifiedSales
Complete Answers 100% Pass
What manufacturers have had products sold in June of 2015? Only show manufacturer names.
- ANSWER Select Distinct ManufacturerName
From SimplifiedSales
Where month(SaleDate) = 6 and Year(SaleDate) = 2015
What were the category, productname, color and item size of products manufactured by
Converse and sold in 2014? - ANSWER Select Distinct Category, ProductName, Color, Itemsize
From simplifiedsales
Where ManufacturerName = 'Converse'
And Year(SaleDate) = 2014
Give all data for sales of more than $130 - ANSWER Select * From SimplifiedSales Where Price
> 130
List all the information for each sale made to customer Stephen Liddle. - ANSWER Select *
From SimplifiedSales
Where Firstname = 'Stephen'
And Lastname = 'Liddle'
,What are the product names of boots size 12 and above sold in 2014? (Category names are
not capitalized.) - ANSWER Select Distinct productname
From SimplifiedSales
Where Category = 'boots' And itemsize >= 12 And Year(SaleDate) = 2014
What were the sales prices of the product named hampton boots that have been sold?
(Product names are not capitalized in the database.) Return only the sales prices. - ANSWER
Select Price
From SimplifiedSales
Where ProductName = 'hampton boots'
Which products were sold on the second of January of 2014? Only show product names. -
ANSWER Select Distinct ProductName
From SimplifiedSales
Where SaleDate = '2014-1-2'
Give a list of customer's last and first names with the product names who have purchased
boots priced $10 and under. (Category names are not capitalized.) - ANSWER Select Distinct
lastname,
firstname,
productname
From SimplifiedSales
Where Category = 'boots'
,And Price <= 10
Give first and last names of customers who have made purchases costing $120 or more but
less than $130. Only show customer names. Do not use BETWEEN for this query. - ANSWER
Select Distinct Firstname,
Lastname
From SimplifiedSales
Where Price >= 120
And Price < 130
What are the colors of sold products whose price is more than $100? Show only colors. -
ANSWER Select Distinct Color
From SimplifiedSales
Where Price > 100
CHAPTER 2 QUERY SET #2 - ANSWER
Give an alphabetical list of manufacturers who have had products sold in June of 2015? Only
show manufacturer names. - ANSWER SELECT Distinct ManufacturerName
FROM simplifiedsales
WHERE month(SaleDate) = 6 and year(saledate) = 2015
ORDER BY ManufacturerName
, What are the names (first and last) of customers who have made purchases in June or
December of 2015? - ANSWER Select Distinct Firstname,
Lastname
From SimplifiedSales
Where (month(SaleDate) = 6
Or month(SaleDate) = 12)
And Year(SaleDate) = 2015
Show all of the prices at which products manufactured by Keds have been sold. Sort it in
descending order by price. (Manufacturer names are capitalized in the database.) Only show
product names and prices. - ANSWER Select Distinct Productname,
Price
From SimplifiedSales
Where ManufacturerName = 'Keds'
Order by Price DESC
What are the prices of blue sandals and green sandals that have been sold? Show the various
prices by color sorted with blue sandals first and then by descending price. (Colors are
capitalized in the database.) Show only colors and prices. - ANSWER Select Distinct Color,
Price
From SimplifiedSales