Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For all the questions below write SQL query. Submit your queries in one pdf docu

ID: 3856402 • Letter: F

Question

For all the questions below write SQL query. Submit your queries in one pdf document. You only need to submit the query statement, no need to include resultset.

The number at the end of the query statement indicates the number of rows returned by the query.

We are using AdventureWorkd2012 database for this assignment.

Select Product ID, name, and size of all products with a size of S, M, or L sort the results by name. (Production.Product)(31)

Select Sales Order ID, order date, subtotal, and total for all orders with a total amount due between 5000 dollars and 9,999.99 sort the results by order date. (Sales.SalesOrderHeader)(393)

Select all currency which use the word dollar in the currency name and which are not 'US dollar'(Sales.Currency 14)

Show all sales person who have been assigned a sales quota and also have got bonus of more than $3000(Sales.SalesPerson 9)

Show all the stores which have sales person with id 275 or 282 or 288 or 277 or 290(Sales.Store 307)

Show all the bike stores worked by sales person id 282 or 275.(eg. a bike store will have the word bike in the name)(Sales.Store 40)

For all products which are listed for less than $20 create a list which shows the name product number in one column. (Production.product 215). For Example if the product is id=922 the result will show Road TIre Tube - TT-R982

Show all products which start selling within 2 days of june 1, 2002.( Production.Product 211)

Show all products that we start selling in June and may.( Production.Product 211)

Show the maximum list price, average list price, maximum standard cost and minimum standard cost. Make sure all columns have a headings.(Production.Product 1)

Explanation / Answer

Hi,

I could complete 7 out of 10 questions in the alloted time. Please paste the rest of the questions in next question.

Below are the answers-

Ans 1- select productid,name,size from product where size in('S','M','L');

Ans 2- Select salesorderid,orderdate, subtotal,totaldue from SalesOrderHeader where totaldue>=5000 and totaldue<=9999.99;

Ans 3- select currencycode,name from currency
where name like '%dollar%' and name<>'US dollar';

Ans 4- select * from salesperson where salesquota='Y' and bonus>3000;

Ans 5- select a.* from store a
join salesperson b
on a.BusinessEntityId=b.a.BusinessEntityId
and b.a.BusinessEntityId in(275,282, 288 ,277, 290);


Ans 6- select a.* from store a
join salesperson b
on a.BusinessEntityId=b.a.BusinessEntityId
and b.BusinessEntityId in(275,282)
and a.Name like '%bike%';

Ans 7- select name+'-'+productid from product where Listprice<20;

Regards,

Vinay

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote