Skip to content
Advertisement

Pivot table without crosstab/tablefunc

I have a table like this

INPUT

I want to be able to pivot this table in the following manner

OUTPUT

All the articles that I can find online pivot tables based on a second column. My ultimate goal is to get one records per ID.

FINAL OUTPUT

Here the values of the size, python, cpp, non-code columns are aggregated.

Advertisement

Answer

With conditional aggregation:

See the demo.
Results:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement