次のmysqlテーブルがあります:
+----+-----+-----+--------+
| id | sid | tid | val |
+----+-----+-----+--------+
| 1 | 1 | 1 | square |
| 2 | 1 | 2 | big |
| 3 | 1 | 3 | red |
| 4 | 2 | 1 | circle |
| 5 | 2 | 2 | small |
| 6 | 2 | 3 | yellow |
+----+-----+-----+--------+
そして、次の結果を得るにはクエリが必要です。
+-----+--------+-------+--------+
| sid | figure | size | colour |
+-----+--------+-------+--------+
| 1 | square | big | red |
| 2 | circle | small | yellow |
+-----+--------+-------+--------+
何か案は?
ありがとう。