IS3063 PLEASE WRITE THIS IN SQL Query 5. Show the product name and manufacturer
ID: 3755147 • Letter: I
Question
IS3063 PLEASE WRITE THIS IN SQL Query
5. Show the product name and manufacturer ID for all pink heels. Hint: Remember that all colors have their first letter capitalized. Hint: Remember that all categories are all lowercase.
6. What ProductIDs were sold in December 2014? Show each productID only once. Hint: Your query should only have one column: ProductID.
7. What is the price rounded to the nearest dollar of all boots in the database? Show product name, color, and rounded price (give this column an alias of RoundedPrice). Hint: Remember that all categories are all lowercase.
8. Show the name, city, state, phone number, and first two digits of the postal code for manufacturers in Oregon (OR) and Washington (WA). Give the last column an alias of ZipPrefix.
9. Show the name, color, and ManufacturerID for all sneakers that DO have a color listed.
10. Show the last name, state, and phone number for customers with customerIDs between 17700 and 17800. In the phone number column, change all of the dashes to periods. Give this column an alias of PhoneFormatted. Hint: Your query results should have 3 columns: LastName, State, and PhoneFormatted.
SQL Exam #2-Single Table Queries For each information request below, formulate a single SQL query to produce the required information. Read the problems carefully and in each case, you should display only the columns requested. Be sure that your queries do not produce duplicate records unless otherwise directed. The interface below may not remember queries you have written if you have to leave the page for any reason before you submit, so be sure to keep a copy of your queries in case you need to enter them again Sale Product CusomeD SalelD SaleDate CustomeriD roductID Manufacturerl ame eetAddress City State ManufacturerlD Category Color Price Description UCtID tate stalCode Quantity rice hone Country Due Date: Sep 28 at 09:52 Points: 100Explanation / Answer
5.
Select ProductName,ManufaturerID from Product where color = 'Pink' and Category = 'heels';
6.
Select ProductID from Sale where month(SaleDate) = 12 and year(SaleDate) = 2014;
7.
Select ProductName,Color, Round(Price,0) as RoundedPrice from Product where Category = 'boots';
8.
Select ManufacturerName,City,State,Phone, Substring(PostalCode,1,2) as ZipPrefix from Manufacturer where State = 'Oregon' or State = 'Washington' ;
9.
Select ProductName,Color,ManufacturerID from Product where Category = 'sneakers' and Color IS NOT NULL;
10.
Select Lastname,State,Replace(Phone,'-', '.') as PhoneFormatted from Customerwhere CustomerID between 17700 and 17800;
Do ask if any doubt. Please upvote.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.