Long time have visited this site and got lot of help. Now I could not find what I'm looking for. I'm working on Oracle SQL database
Table
columnA ColumnB ColumnC
10A AA 00
10A AA 10
10A AA 20
10A AA 30
10A BB 00
10A BB 10
10A BB 20
10A BB 30
and what I would like to do is extend the columns where there is same data in ColumnA and B like:
columnA ColumnB ColumnC ext.ColumnD ext.ColumnE ext.ColumnF
10A AA 00 10 20 30
10A BB 00 10 20 30
I have tried different pivots, tried lot of suggestions I've found forums but just cant get the result I hope for.
This is my first post so sorry in advance if there is something wrong or information is missing.
Thank you so much in advance!
/ edit
And there would not be same data in ColumnC always or even as many differents. If BB would not have 10 and have differents, it should look something like this:
columnA ColumnB ColumnC ext.ColumnD ext.ColumnE ext.ColumnF
10A AA 00 10 20 30
10A BB 00 17 47
Also goal is to get them increasing order, but that can be done with query, sorting in the first place.
/Edit
Now that I have this one table:
ColumnA ColumnB ColumnC Height1 Height2 Height3 height4
5A 11 A 0 25 50 75
5A 11 B 0 25 50 75
5A 11 C 0 25 50
5A 11 D 0 25 50 75
I have one row in the original table that have random digits which are unique and it needs to go after the height. pivot table with unique row:
ColumnA ColumnB ColumnC Unique ColumnE ColumnF ColumnG ColumnG
5A 11 A 16805097 00
5A 11 A 62366527 25
5A 11 A 65672596 75
5A 11 A 68078617 50
So results would be:
ColumnA ColumnB ColumnC Height1 Unique1 Height2 Unique2 Height3 Unique3 Height4 Unique4
5A 11 A 00 16805097 25 62366527 75 65672596 50 68078617
So if we would take the original question's table, the start point would be like this:
columnA ColumnB ColumnC ColumnD
10A AA 00 699787
10A AA 10 439567
10A AA 20 429456
10A AA 30 122172
10A BB 00 133244
10A BB 10 328311
10A BB 20 247422
10A BB 30 769636
Br Jan