如何从DolphinDB表中选择非重复行数据?我distinct
在手册中找到了该功能。我尝试了下面的代码,但没有用。
select distinct(col1,col2) from table
=====================================
The function [distinct] expects 1 argument(s), but the actual number of arguments is: 2
select distinct([col1,col2]) from table
=====================================
The argument for 'distinct' must be a typed vector
似乎与众不同只能应用于一列。有什么解决办法吗?
该函数distinct
为单个列返回唯一元素。如果要根据多列过滤出重复的行,强烈建议使用function isDuplicated
,它是0.99版中引入的DolphinDB的。
select * from table where isDuplicated([col1, col2], FIRST)=0
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句