提取第一个字段里的关键字后,自动计数第二个字段的sql语句
select
count(p.TOTAL_OIL_PROD) yx ,
count(p.well_name) js
from PC_N__WPD_DAILY p
where p.org_id = '${org_id}'
and to_char(p.PROD_DATE, 'yyyy-mm') ='${format(reportDate, 'yyyy-MM') }'
and p.remark like '%上修%'
group by to_char(p.PROD_DATE, 'yyyy-mm')