请帮助我简化和降低以下询问的费用?
我试图使其成为与NOT EXISTS共同相关的分局,但它没有给我任何产出。
请注意,主问和内询问的表格与表1相同。
SELECT *
FROM Table_1 A
WHERE A.Col1 = abcd
AND (A.Col2, A.Col3) NOT IN
(SELECT Col2,
Col3
FROM Table_1 B
WHERE (B.Col4 IN (1,2,3)
And B.Col5 In ( x , y ))
OR (B.Col4 = 1 AND B.Col5 = z AND B.Col6 = f )
))
Thanks in advance, Savitha