इस तक पहुंचने का एक तरीका सशर्त एकत्रीकरण है:
select min(ID), SIN,
max(case when type = 'phone' then contact end) as phone,
max(case when type = 'email' then contact end) as email
from people t
group by sin;
इस तक पहुंचने का एक तरीका सशर्त एकत्रीकरण है:
select min(ID), SIN,
max(case when type = 'phone' then contact end) as phone,
max(case when type = 'email' then contact end) as email
from people t
group by sin;