这个查询一天产量的语句如何改成查询当月每天产量的语句啊 select '2012-09-18' 日期,lyjzm,TO_CHAR(sum(jzll),'99999999999.9') 井排液量,TO_CHAR(sum(jzyl),'99999999999.9') 井排油量
from ys_dhb12 t where zm='联合站'
and
((rq=to_date('2012-09-17','yyyy-MM-dd') and cjsj in('10:00','12:00','14:00','16:00','18:00','20:00','22:00')) or (rq=to_date('2012-09-18','yyyy-MM-dd') and cjsj in('0:00','2:00','4:00','6:00','8:00')))
and (lyjzm='注采站' or exists(select 1 from YS_DHA14 where zm=t.lyjzm and zb='11')) group by lyjzm