Project #78644 - Queries

 8 SQL statements

**Template for assignment Attached

**Site for Adventureworks:  It has to be AdventureWorksLT2012

http://msftdbprodsamples.codeplex.com/releases/view/93587

Using the AdventureWorksLT2012 database, write a SQL SELECT statement that will retrieve the data for the following questions:

Query #1: Display the character constant 'Greeting' with a column heading of 'Hello.'

Query #2: Display all data from the Products table without specifying the names of the table columns. Order the results by Product Name.

Query #3: Display all employees' names, last name first, and then first name, and hire date. Order the results by employee name, last name first, and then first name.

Query #4: Modify query 3 so that the column headings are as follows: 'Last Name,' 'First Name,' and 'Date of Hire'.

Query #5: Display all fields from the Sales Order detail for all products that have a unit price greater than $50. Order the results by unit price in descending order.

Query #6: Display the Sales Order Id, Ship Date, and Freight of all orders that have a freight greater or equal to 50 and less than or equal to 1000.

Query #7: Select the Employee's First Name, concatenated to the Last name, separated by a space. Call the column 'Employee Name,' the length of this employee name Length, the location of the first 'a' in the name 'A Location,' and the 3–5 characters from the name 'Substring.' Order the results by the Employee Name using the alias.

Query #8: For each customer, show the number of orders placed, and the largest, smallest and total freight ordered. Only show those customers whose total freight is greater than $1000.

Query #9: Display all product columns for products that are red and black and have a list price greater than or equal to $400 and less than or equal to $800. Use the keywords BETWEEN and IN.

Query #10: Rewrite query #9 to remove the use of BETWEEN and IN, and replace with the equivalent use of =, <, >, /= and AND and OR expressions.

Subject Computer
Due By (Pacific Time) 08/10/2015 12:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy