I have the following data and to need to transpose it:
Job CRSE Count
O UG_UPPER 8
O UG_LOWER 4
O GR 0
S UG_LOWER 1
T UG_UPPER 21
T UG_LOWER 4
T GR 9
TA UG_UPPER 0
TA UG_LOWER 0
into the following:
Job O O O S T T T TA TA
CRSE UG_LOWER UG_UPPER GR UG_LOWER UG_LOWER UG_UPPER GR UG_LOWER UG_UPPER
Count 4 8 0 1 4 21 9 0 0
Can it be done in one SQL statement in MySQL ??
How about below simplified input:
Job Count
O 41.5
S 0
T 5.5
TA 21
to be turned into:
Job O S T TA
Count 41.5 0 5.5 21