select sum(gwgz),sum(XJ),sum(bbgz),sum(GWJT),sum(GFJT),sum(JCJX),sum(ZFBT), sum(YEFY), sum(JBCS), sum(BFGZ),sum(QQJ),sum(KQQHE), sum(JJBZNX),SUM(TEXNX),SUM(NXJS),SUM(JJJJF),SUM(ZWJT),SUM(NZJ),SUM(XYJYF),SUM(XYJ),SUM(XYCYJ),SUM(XYYSJ),SUM(CJGJF), SUM(WYGJF), SUM(GQGJF), SUM(YDGJF), SUM(YZFW),SUM(XXJB),SUM(JX),SUM(JXBJJF),SUM(YSF), SUM(CJCLBT), SUM(LXSTJJ), SUM(STJJ), SUM(BLZKBT), SUM(FZCJJTBGXJ), SUM(QCB),SUM(QZMYMZYZJRCJT),SUM(KZRTBJL), SUM(GLCXJ), SUM(GHHZJ),SUM(ZYYPJL), SUM(FBYFJL), SUM(TYJL), SUM(JDJT), SUM(YCHZBT), SUM(GJKYHJT), SUM(XXJL), SUM(LGBSMFW),SUM(GLJL),SUM(RT), SUM(TXF), SUM(GZJT),SUM(ZFFLBT),SUM(MQBT),SUM(CJSWK), SUM(GZCBT),SUM(ZSGXJ),SUM(YSTBJ),SUM(SYJT), SUM(WSF), SUM(SRJ), SUM(ZQSW), t2.lastname ,zy
from formtable_main_60 t1,hrmresource t2
where t1.xmr=t2.id
and
SUBSTR (TO_CHAR(TO_DATE (modedatacreatedate,'yyyy/mm/dd'),'yyyy/mm/dd'),0,7)
>= SUBSTR (TO_CHAR(TO_DATE ('${起始时间}','yyyy/mm/dd'),'yyyy/mm/dd'),0,7)
and
SUBSTR (TO_CHAR(TO_DATE (modedatacreatedate,'yyyy/mm/dd'),'yyyy/mm/dd'),0,7)
<= SUBSTR (TO_CHAR(TO_DATE ('${结束时间}','yyyy/mm/dd'),'yyyy/mm/dd'),0,7)
group by t2.lastname 已经有一个 t2.lastname 如果想在这段语句里再加一个 zy的字段 要怎么加, 很急求个大神帮帮忙