Хорошо, я наконец смог записать это:
Select x.id, x.shape,y.color
from
(Select id ,shape
from Shapes
where status in ( Select max (status)
from shapes
group by id)
) x
join
(Select id , color
from shapes
where status in (Select min(status)
from shapes
group by id )
) y
on x.id = y.id;
Более короткие ответы приветствуются