DRAG DROP
You use a Microsoft SQL Server 2012 database.
You need to create an indexed view within the database for a report that displays Customer Name
and the total revenue for that customer.
Which four T-SQL statements should you use? (To answer, move the appropriate SQL statements
from the list of statements to the answer area and arrange them in the correct order.)
Explanation:
http://msdn.microsoft.com/en-us/library/ms191432.aspx
Read all restrictions for indexed views.
Also read this usefulhttp://stackoverflow.com/questions/12419330/how-to-create-indexed-view-with-select-distinctstatement-insql-2005
I think the answer is wrong.
When you apply aggregation functions (SUM and COUNTBIG) you have to include the remaining columns (CustomerID and CustomerName) in the GROUP BY clause.
I would also only use the CREATE UNIQUE CLUSTERED INDEX statement at the end.
What do you guys think (and why)?
0
0
I think you’re right. Using aggregation function in query you have to use GROUP BY clausule.
0
0
2-3-4-6
0
1
2-3-4-5 It has to be a cluster index (5.Create the unique clustered index on the view.)
https://msdn.microsoft.com/en-CA/library/ms191432.aspx
1
0
Agree
0
0
By the way, part of that new 200Q 70-461 dumps FYI:
https://drive.google.com/open?id=0B-ob6L_QjGLpfnJldlZxTklTaHM0akpJUzhja2pETHJOS0owMzd4eVk1UTVNQUpvdlVxVWM
Best Regards!
0
0
2-3-4-5
0
0