I'm trying to design a query in which a sum is derived from a subquery which should select top 2 Currently this sometimes produces more than 2 where there are ties eg Select top 2 from (12, 10, 10 )... this produces all three so the sum is 32 instead of what I need... 22
Sample DB
Kind Regards
Sample DB
Kind Regards