1
私は以下の構造を持っています。 | id | value |列に私のSQL行をピボット
| a | v1 |
| b | v2 |
| c | v3 |
| d | v4 |
出力が必要です。
| a | b | c | d |
| v1 | v2 | v3 | v4 |
私がアドバイスしてください多くを試みたが、成功
select case when t1.id = 'a' then t1.value end as a ,
case when t1.id = 'b' then t1.value end as b ,
case when t1.id = 'c' then t1.value end as b ,
case when t1.id = 'd' then t1.value end as d
from
t1
を得ることができます。あなたは必要な結果の集計関数を使用する
おかげ
ありがとうございました –