I have a table schema as below:
| Student ID | Subject | Marks | 
|---|---|---|
| 1 | Maths | 10 | 
| 1 | Physics | 30 | 
| 2 | Maths | 25 | 
I want to select the values in below format:
| Student ID | Maths | Physics | 
|---|---|---|
| 1 | 10 | 30 | 
| 2 | 25 | 
Could you please suggest how this can be accomplished in SQL? I'm using Postgresql.
Or I'll have to do it in Java as that is our middleware?
Thank you.
 
    