我在批量插入脚本中犯了一个错误,所以现在我有不同colX的"重复"行.我需要删除这些重复的行,但我无法弄清楚如何.更确切地说,我有这个:
col1 | col2 | col3 | colX
----+----------------------
0 | 1 | 2 | a
0 | 1 | 2 | b
0 | 1 | 2 | c
0 | 1 | 2 | a
3 | 4 | 5 | x
3 | 4 | 5 | y
3 | 4 | 5 | x
3 | 4 | 5 | z
Run Code Online (Sandbox Code Playgroud)
我想保留每个(row,colX)的第一次出现:
col1 | col2 | col3 | colX
----+----------------------
0 | 1 | 2 | …Run Code Online (Sandbox Code Playgroud)