select sfzmhm,zp,gxsj,xzqh,flag,xh,rksj,fzjg from GYJG.DRV_PHOTO where ZP is not null and fzjg is null and sfzmhm is not null and to_char(GXSJ,'yyyy-mm-dd')<![CDATA[ >= ]]>#{start}
and to_char(GXSJ,'yyyy-mm-dd')<![CDATA[ < ]]>#{end}
select sfzmhm,zp,gxsj,xzqh,flag,xh,rksj,fzjg from (select * from GYJG.DRV_PHOTO where ZP is not null
and to_char(GXSJ,'yyyy-mm-dd')<![CDATA[ >= ]]>#{start} and to_char(GXSJ,'yyyy-mm-dd')<![CDATA[ < ]]>#{end})a where (a.fzjg!='贵A' or a.fzjg is null)