I have a query that returns the following resultset:
GROUP_ID | ORDER | ID 1 | 1 | 1000 1 | 2 | 1004 1 | 3 | 1005 2 | 1 | 2400 2 | 2 | 2402 3 | 1 | 3000 3 | 2 | 3001 3 | 3 | 3002
And I need to turn rows into columns (ORDER values will become columns) like this:
GROUP_ID | 1 | 2 | 3 1 | 1000 | 1004 | 1005 2 | 2400 | 2402 | 3 | 3000 | 3001 | 3002
How can I do this?