I use SQL Server 2012,
I have a following table:
id, name, surname, timestamp, type
type has two possible values: 1 and 2.
Now, I would like to find two rows - for each group (1 and 2) row with maximal value in particular type.
The problem is that I would like to find both name and surname.
I can do it with SELECT TOP 1 - WHERE ORDER BY - UNION approach, but I would like to find antother, better idea.
Can you help me ?