I have a table with three columns: A,B,C
.
The values are:
+---+-----+----+
| 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 |
+---+-----+----+
If I first order the data by column A
, then column B
, then column C
(although I did make all column C
values the same per column A
value) how would I select the "first row" per column A
?
So, this should result in:
+---+-----+----+
| A | B | C |
+---+-----+----+
| 1 | -10 | 5 |
| 2 | 0 | 12 |
| 3 | -10 | 14 |
| 4 | 0 | 8 |
| 5 | -5 | 6 |
+---+-----+----+