如何根据另一列 (ID) 从一列 (Amount) 中选择前 10 个降序总计?
这就是我希望我想要的结果看起来像:
(Top 1)
Row 1: ID: 9, Amount: 10, Total: 15
Row 2: ID: 9, Amount: 5, Total: 15
(Top 2)
Row 3: ID: 500, Amount: 14, Total: 14
(Top 3)
Row 4: ID: 27, Amount: 3, Total: 9
Row 5: ID: 27, Amount: 3, Total: 9
Row 6: ID: 27, Amount: 3, Total: 9 etc.
谢谢。