1、你的sql函数只能选择一个是因为用的是等号。。。没有使用in。所以只能选择一个
2、不选择方案号不出数据。是因为你没有判断假如方案号为空就忽略这个参数的原因。。。
sql("PRODUCTSTAGE_impala","select sum(product_numbers_kpcs) over(partition by rdp_code,solution_source_id,version_num) from tianma_bi.dws_profit_result_sys
where 1=1"+ if(len($RDP_NO)=0,""," and rdp_code in ('"+ $RDP_NO +"')") + if(len($VERSION)=0,""," and version_num in ('"+ $VERSION +"')")
+ if(len($SCHEMA)=0,""," and solution_source_id in ('"+ $SCHEMA +"')") + " and sales_currency='CNY'",1,1)