Subject RE: Possible to use FIRST 1 inside a group by?
Author Maya Opperman
Thank you for the help everyone!

I think Sean's looks the most efficient, as that will only run the sub-query once.

Now that I know how to use this trick, I think I could use this in quite a few other places too ;-)


> T.ID
> T.GroupID
> T2.FKCode
> T2.Value
> select MIN (ID) as ID, GroupID
> from MyTable
> ) T
> JOIN MyTable T2 ON T2.ID = T.ID