0

I have a join query which give me out like below :

rollNo subject score
1 Maths 90
1 English 80
1 Science 70
1 Computer 90

I want output like below:

rollNo Maths English Science Computer
1 90 80 70 90
Paul Spiegel
  • 30,925
  • 5
  • 44
  • 53
Pradip
  • 21
  • 2
  • Search for existing solutions using the term "PIVOT". – Akina Oct 26 '22 at 10:21
  • Does this answer your question? [MySQL pivot row into dynamic number of columns](https://stackoverflow.com/questions/12004603/mysql-pivot-row-into-dynamic-number-of-columns) – PeterJames Oct 28 '22 at 07:48

0 Answers0