请问,count(distinct x)写法在group by语句下无法执行,请问还有别的方法可以做到去重统计吗?
比如,在DolphinDB database的GUI中执行下列语句:
t=table(3 2 2 3 3 4 as x,1 1 1 2 2 2 as code);
select count(distinct x ) from t group by code;
报错:
Can't call an aggregated function in the argument of another aggregated function call.但去掉其中的group by是可以的。