可以给数据窗口加变量, 但是如有空值, 查询语句应这样写
select gh,name,sum(je)
from person
where status = 't'
and (sex = :as_sex or sex is null)
group by gh,name
意思即是 查询 status = 't' 并且 sex = as_sex(指定要查询的变量) 或 sex 为空的记录
select gh,name,sum(je) from person where status = 't' or sex in('m','f') group by gh,name