SELECT b.czrq00, b.mzh000, b.brid00, b.xm0000,

                           NVL (a.zje000, 0) zje000, NVL (a.fjf000, 0) fjf000,

                           NVL (a.zhje00, 0) zhje00, a.yjksbh, a.zlxmid
                        
                      FROM vw_tj_yjdjh0 a, sf_brfy00 b, bm_tydwb0 c

                     WHERE a.sfdjh0 = b.djh000

                       AND a.dwid00 = c.dwid00

                       AND b.brfb00 IN (1, 3)

                       AND b.czrq00 BETWEEN '20100801' AND '20100810'

                       AND a.xmzt00 IN ('2', '3', '4')

                       AND c.dwbz00 IS NULL

                       AND c.dwid00 = 0

          ORDER BY czrq00, brid00








