tabl1 with columns
col_a | col_b
a | 1
a | 2
b | 3
b | 4
I want to select only the first row of every letter, so I get:
a | 1
b | 3
How can I achieve this?
I can do it with GroupBy, but it might be not the most efficient way, so I'm looking if there's more efficient way.
did you benchmark it?
No, but my guess is that it will have to run through all rows to then select first of each. That's how it works at least in group by: ctx.Table1.GroupBy(x => x.ColA).Select(x => x.First())
Обсуждают сегодня