<> |
<> | попробуйте
select id, max(k1) from tabla
union all
select id, max(k2) from tabla
union all
select id, max(k3) from tabla |
фигню написал.. c id не покатит, сори |
та не - почти правильно написал:
Select id, Max(rdata)
From
(
select id, k1 as rdata from tabla
union all
select id, k2 as rdata from tabla
union all
select id, k3 as rdata from tabla
)
Group by id