このエラーメッセージがどこから来ているのかわかりません。
すべての派生テーブルには独自のエイリアスが必要です
私の見解では、すべてのテーブルにエイリアスを追加しましたか?
SELECT ccdnormal.*
FROM card_call_detail AS ccdnormal
JOIN (
SELECT ccd1.DB_CALL_ID
FROM card_call_detail_tmp1 AS ccd1
JOIN card_call_detail_tmp2 AS ccd2 ON ccd1.card_number = ccd2.card_number
WHERE ccd1.start_time <> ccd2.start_time
AND ccd1.end_time > ccd2.start_time
AND ccd1.DB_CALL_ID <> ccd2.DB_CALL_ID
AND ccd2.start_time BETWEEN ccd1.start_time AND ccd1.end_time
UNION ALL
SELECT ccd4.DB_CALL_ID
FROM card_call_detail_tmp3 AS ccd3
JOIN card_call_detail_tmp4 AS ccd4 ON ccd3.card_number = ccd4.card_number
WHERE ccd3.start_time <> ccd4.start_time
AND ccd3.end_time > ccd4.start_time
AND ccd3.DB_CALL_ID <> ccd4.DB_CALL_ID
AND ccd4.start_time BETWEEN ccd3.start_time AND ccd3.end_time )
) AS CCDOUTPUT ON CCDOUTPUT.DB_CALL_ID = ccdnormal.DB_CALL_ID