如题:
select
max(case when name=‘1‘ then [temp] else null end) as temp1
, max(case when name=‘2‘ then [temp] else null end) as temp2,
max(case when name=‘3‘ then [temp] else null end) as temp3
from historyt group by time
时间: 2024-10-13 23:48:06
如题:
select
max(case when name=‘1‘ then [temp] else null end) as temp1
, max(case when name=‘2‘ then [temp] else null end) as temp2,
max(case when name=‘3‘ then [temp] else null end) as temp3
from historyt group by time