select q.dbid, lc.dbid lc_id, a.email
from t_qt_sj_sjhdgl_sqjlb q
left join t_qt_sj_sjhdgl_sqjlb_lc lc
on q.dbid = lc.sqjlb_id
left join t_qt_jc_account a
on q.userid = a.username
where q.dqlc = ‘ytgdxd’
and ROUND(TO_NUMBER(sysdate - lc.kssj) * 24) > 48
and q.dbid not in
(select z.dbid fff from T_QT_JC_ZNXX z where lc.dbid = z.lc_id)
or q.dbid in (select zz.dbid fff
from T_QT_JC_ZNXX zz
where lc.dbid = zz.lc_id
and fsjg = ‘1’)
Oracle左连接
最新推荐文章于 2024-10-28 18:22:07 发布