I may model the question as followsCreate table #t(F1 int, F2 int, F3 int, F4 int)Insert into #t Select 1,3,456,567 UnionSelect 1,5,43516,15667 UnionSelect 1,7,332,2467 UnionSelect 2,5,0,1 UnionSelect 3,3,46,567 UnionSelect 3,1,87,53 UnionSelect 4,1,343,457 UnionSelect 4,6,4856,111
Query should output something like the "output of the" following:Select 1,7,332,2467 UnionSelect 2,5,0,1 UnionSelect 3,3,46,567 UnionSelect 4,6,4856,111
In other words, I need, the data of the table #t to be grouped by F1 and select any row (record) from each group.ie. A record from the group having F1 = 1A record from the group having F1 = 2A record from the group having F1 = 3.....The difference in the real situation is tat there r much more than 4 columns,.It doesn't matter which record I get, I need to have one per a unique F1.Srinika