直接 case when a>percentile(a,0.1) then 1 else 0 end
报错,求助怎么做筛选呀
直接 case when a>percentile(a,0.1) then 1 else 0 end
报错,求助怎么做筛选呀
收起
用子查询。
先查percentile(a,0.1),再将结果连接原来的表当做子表。再用case when查这个子表。
我最后这样实现了:case when a>(select percentile(a,0.1)from temp) then 1 else 0
报告相同问题?