Použijte podmíněnou agregaci:
select
date,
max(case when name = 'sensor01' then value end) sensor01,
max(case when name = 'sensor02' then value end) sensor02
from mytable
group by date
Použijte podmíněnou agregaci:
select
date,
max(case when name = 'sensor01' then value end) sensor01,
max(case when name = 'sensor02' then value end) sensor02
from mytable
group by date