Here's the sample:
select * from tmp
--output
A       B       Value
---------------------
a       x       1
b       x       2
a       y       3
b       y       4
c       y       5
After a SQL command grouping on B column, I'd like to make each value of column A to be a separate column as illustrated below:
B       a       b       c
----------------------------
x       1       2       null
y       3       4       5
If there any specific terminology for this transformation? Thanks!
 
    