How to select table with condition like this.
I have a table that holds all kinds of subjects like this.
table subjects
| Subjects id | Subjects |
|---|---|
| 01 | mathematics |
| 02 | biology |
| 03 | geography |
| 04 | physics |
then I also have a table to hold the value of each student like this.
table score
| Student id | Subjects id | Score |
|---|---|---|
| 10001 | 01 | 8 |
| 10001 | 02 | 6 |
| 10001 | 03 | 7 |
| 10001 | 04 | 9 |
| 10002 | 01 | 5 |
| 10002 | 02 | 7 |
| 10002 | 03 | 10 |
| 10002 | 04 | 7 |
| 10003 | 01 | 6 |
| 10003 | 02 | 7 |
| 10003 | 03 | 8 |
| 10003 | 04 | 9 |
I want to create a query with a form like the following table but i dont know how to make it.
| Student id | mathematics | biology | geography | physics |
|---|---|---|---|---|
| 10001 | 8 | 6 | 7 | 9 |
| 10002 | 5 | 7 | 10 | 7 |
| 10003 | 6 | 7 | 8 | 9 |
please help me to solve this problem. Sorry my english is bad. I am still beginner