Câu 41: 70-461: MCSA Querying Microsoft SQL Server 2012/2014
SIMULATION -You need to create a query that calculates the total sales of each OrderID from a table named Sales.Details. The table contains two columns named OrderID andExtendedAmount. The solution must meet the following requirements: ✑ Use one-part names to reference columns. ✑ Order the results by OrderID with the…
Nội dung câu hỏi
SIMULATION -You need to create a query that calculates the total sales of each OrderID from a table named Sales.Details. The table contains two columns named OrderID andExtendedAmount. The solution must meet the following requirements: ✑ Use one-part names to reference columns. ✑ Order the results by OrderID with the smallest value first. ✑ NOT depend on the default schema of a user. ✑ Use an alias of TotalSales for the calculated ExtendedAmount. ✑ Display only the OrderID column and the calculated TotalSales column. Provide the correct code in the answer area. Key Words:
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. SELECT OrderID, SUM(ExtendedAmount) AS TotalSales FROM Sales.Details GROUP BY OrderID ORDER BY OrderID — đáp án hiện tại
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.