我有一个包含三列的表:A,B,C
.
这些值为:
+---+-----+----+
| A | B | C |
+---+-----+----+
| 1 | -10 | 5 |
| 1 | 0 | 5 |
| 1 | 10 | 5 |
| 2 | 10 | 12 |
| 2 | 0 | 12 |
| 3 | -10 | 14 |
| 4 | 0 | 8 |
| 4 | 10 | 8 |
| 5 | 0 | 6 |
| 5 | 1 | 6 |
| 5 | -5 | 6 |
+---+-----+----+
如果我首先按 column A
,然后 column B
,然后 column对数据进行排序C
(尽管我确实使C
每列值的所有列值都相同A
)我将如何选择每列的“第一行” A
?
因此,这应该导致:
+---+-----+----+
| A | B | C |
+---+-----+----+
| 1 | -10 | 5 |
| 2 | 0 | 12 |
| 3 | -10 | 14 |
| 4 | 0 | 8 |
| 5 | -5 | 6 |
+---+-----+----+