-4
ID|FK|cost|name |
--|--|----|------
1 | 1| 200| name2|
2 | 1| 100| name2|
3 | 3| 900| name1|
4 | 2| 500| name3|
5 | 2| 100| name3|
6 | 2| 200| name3|
我需要這個結果,其中收集具有相同的外鍵MySQL的行
ID|FK|cost-|name |
--|--|-----|------
1 | 1| 300 | name2|
2 | 3| 900 | name1|
3 | 2| 800 | name3|
我需要cood mysql –
然後這是錯誤的地方。沒有人會在這裏爲你寫代碼。 –
如何快速獲得答案? –