I want to be able to get the first row of each group of id & type, I'll give and example :
Type Id terms data_signed is_agreed
----------------------------------------
BUY 1 31 20-01-01 Y
BUY 1 12 19-01-01 Y
BUY 3 99 20-01-01 N
SELL 2 42 19-01-01 N
SELL 2 15 20-01-01 Y
SELL 2 87 20-01-01 Y
I want the result to be
Type Id terms data_signed is_agreed
----------------------------------------
BUY 1 31 20-01-01 Y
BUY 3 99 20-01-01 N
SELL 2 42 19-01-01 N
the records are already ordered by type->id I just want to fetch the first row of each type&field values
couldn't use distinct() since I'm not using PosgreSQL,
do you have any ideas?