SQL transpose

Time:2021-12-4

1、 Transpose

id name count
12 Joe 100
12 Neo 200
12 Lve 300
SELECT
Listing,
GROUP_ Contact (case when column name = specific value then column name end) as new name,
GROUP_ Contact (case when column name = specific value then column name end) as new name,
GROUP_ Contact (case when column name = specific value then column name end) as new name
From data table where condition group by column name

After transposition

id joe->newName neo->newName lve->newName
12 Joe Neo Lve