SIMULATION -
You have a database that contains a table named Products in the Sales schema. The table was created by running the following Transact-SQL statement:
The table includes the data shown below:
You are developing a report that displays the following values and column headers in the order listed below:
✑ average price of a product named Average
✑ the smallest number of products in stock named LowestNumber
✑ the highest product price named HighestPrice
You need to write a query to return the results for the report. The query must meet the following requirements:
✑ Use built-in, aggregate and mathematical functions.
✑ Use two-part names and tables.
✑ Use the table alias to qualify column names.
✑ Define the alias for all fields by using the AS keyword.
✑ Use the first letter of the table name as the table alias.
✑ Do not use the ROW_NUMBER function.
✑ Do not surround object names with square brackets.
✑ Do not use variables.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it.
1. SELECT
2. FROM Sales.Products AS P
Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and character position. You may check syntax as many times as needed.
chaoxes
Highly Voted 4 years, 9 months agoAndy7622
4 years, 4 months ago