查询会龄 sql部分
时间:2021-07-01 10:21:17
帮助过:4人阅读
case when ${fld:vc_age} = ‘1‘ then ((current_date-d.c_idate::date)/30)<3
when ${fld:vc_age} = ‘2‘ then ((current_date-d.c_idate::date)/30)>=3 and ((current_date-d.c_idate::date)/30)<=6
when ${fld:vc_age} = ‘3‘ then ((current_date-d.c_idate::date)/30)>6 and ((current_date-d.c_idate::date)/30)<=12
when ${fld:vc_age} = ‘4‘ then ((current_date-d.c_idate::date)/30)>12 and ((current_date-d.c_idate::date)/30)<=36
when ${fld:vc_age} = ‘4‘ then ((current_date-d.c_idate::date)/30)>36
else true end
)
查询会龄 sql部分
标签: