a table:
+-----+-----+----+
| Sym | Pos | Id |
+-----+-----+----+
| a | 0 | 0 |
| b | 1 | 0 |
| c | 2 | 0 |
| a | 0 | 1 |
| d | 1 | 1 |
| b | 0 | 2 |
+-----+-----+----+
need to build from this table row by Id, that would be followed in order Sym Pos. In this case, that would have:
+-----+-----+----+
| str | Pos | Id |
+-----+-----+----+
| abc | 0 | 0 |
| ad | 0 | 1 |
| b | 0 | 2 |
+-----+-----+----+
Thanks!