Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question has four parts: I have included the tables as a reference. a) Write the query that returns the following result set. This is

This question has four parts: I have included the tables as a reference.

image text in transcribed

a) Write the query that returns the following result set. This is from the HR.Employees table. The results must be explicitly sorted by the last name and the first initial. Only include employees whose first names start with the letters between R and Z inclusive.

image text in transcribed

b) Write a query without a FROM clause and using SQL Server date functions that return the following results (NOTE: Your query should return the current date, not the date that is displayed here, no literals allowed).

image text in transcribed

c) Write a query that provides the following result from the Sales.OrderDetails table using the appropriate functions and calculations.

image text in transcribed

d) Write a query that produces the following results. The query uses the Sales.OrderDetails table. The results are sorted by the line item total values from largest to smallest. The results should only contain line items where the net value is greater than $3,000.00. Further more, the line items must have a quantity of at least 100 items.

image text in transcribed

InsideTSQL2008 " Database Diagrams Tables System Tables FileTables External Tables HREmployees ProductionCategories ProductionProducts Production,Suppliers SalesCustomers SalesOrderDetails El SalesOrders Sales,Shippers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions

Question

1. Explain how business strategy affects HR strategy.

Answered: 1 week ago