I have the following table in MSSQL2005
id | business_key | result 1 | 1 | 0 2 | 1 | 1 3 | 2 | 1 4 | 3 | 1 5 | 4 | 1 6 | 4 | 0
And now i wa
select drv.business_key, mytable.result from mytable inner join ( select business_key, max(id) as max_id from mytable group by business_key ) as drv on mytable.id = drv.max_id