Undocumented Query Plans: The ANY Aggregate

Posted by Paul White on SQL Blog See other posts from SQL Blog or by Paul White
Published on Fri, 01 Jul 2011 14:51:56 GMT Indexed on 2011/07/01 16:28 UTC
Read the original article Hit count: 263

Filed under:
As usual, here’s a sample table: With some sample data: And an index that will be useful shortly: There’s a complete script to create the table and add the data at the end of this post.  There’s nothing special about the table or the data (except that I wanted to have some fun with values and data types). The Task We are asked to return distinct values of col1 and col2 , together with any one value from the thing column (it doesn’t matter which) per group.  One possible result set is shown...(read more)

© SQL Blog or respective owner