0

I am currently having this table named as student:

name fieldColumn fieldvalue
A001 math A
A001 english B
A002 math C
A002 english A

And I want to select as a new table like this as 'math' would be named as class1, and 'english' would be named as class2

name class1 class2
A001 A C
A002 B A

Can someone help a query to do that? I was trying to join but got no luck. Thank you.

I found the same question here How can I return pivot table output in MySQL? which is counting. But my question is just showing fieldcolumn and fieldvalue.

Jack Lee
  • 19
  • 2

0 Answers0