表的每列是每个行业的占比数据,是否有函数可筛选每个行业占比均小于50%的行

请问一下有什么函数可以解决这个:  数据表有33列,产品代码,32个行业的占比数据,如何筛选32个行业每个行业占比均小于50%的行?

请先 登录 后评论

1 个回答

wale

用rowAnd函数,select * from table where rowAnd((col1,col2, ... col32)<0.5),例如下表:

t=table(1..3 as code,0.4 0.5 0.6 as col1,0.4 0.5 0.6 as col2,0.4 0.5 0.6 as col3,0.4 0.5 0.6 as col4)

select * from t where rowAnd((col1,col2, col3,col4)<0.5)

返回:

code	col1	col2	col3	col4
1	0.4	0.4	0.4	0.4

请先 登录 后评论