Microsoft
70-433 · Question #83
70-433 Question #83: Real Exam Question with Answer & Explanation
The correct answer is D. Common table expressions. See the full explanation below for the reasoning.
Question
You have two views named Sales.SalesSummaryOverall and Sales.CustomerAndSalesSummary. They are defined as follows: CREATE VIEW Sales.SalesSummaryOverall AS SELECT CustomerId, SUM(SalesTotal) AS OverallTotal FROM Sales.SalesOrder GROUP BY CustomerId GO CREATE VIEW Sales.CustomerAndSalesSummary AS SELECT Customer.Name, SalesSummaryOverall.OverallTotal, (SELECT AVG(OverallTotal) FROM Sales.SalesSummaryOverall WHERE SalesSummaryOverall.CustomerId = Customer.CustomerId) AS avgOverallTotal, (SELECT MAX(OverallTotal) FROM Sales.SalesSummaryOverall WHERE SalesSummaryOverall.CustomerId =Customer.CustomerId) AS maxOverallTotal, FROM Sales.Customer LEFT OUTER JOIN Sales. Sales.SalesSummaryOverall ON SalesSummaryByYear.CustomerId = Customer.CustomerId GO You have been tasked to modify the Sales.CustomerAndSalesSummary view to remove references to other views. You need to identify a feature to use in the modified version of the Sales.CustomerAndSalesSummary object to achieve the task. Which feature should you use?
Options
- ATable variables
- BTemporary tables
- CUser-defined table types
- DCommon table expressions
Community Discussion
No community discussion yet for this question.