SELECT DISTINCT sci.le_id AS le_id,
sci.sub_profile_id AS sub_profile_id,
sci.GROUP_ID AS GROUP_ID,
sci.cdd_id,
sci.crm_id,
sci.grp_crm_id,
sci.source,
sci.category
FROM table_name sci
WHERE sci.crm_id IN (SELECT master.x_ref_id
FROM biz_master master, biz_pr_master pr
WHERE master.x_latest_txn_id = pr.x_txn_id
AND pr.x_leid IS NULL
AND pr.GROUP_ID IS NULL)
2条答案
按热度按时间mrphzbgm1#
我在想
CASE
:zysjyyx42#
然后把它加到
WHERE
条款如下: