查詢需要很長時間才能響應〜40分鐘。 `SELECT c.consumer_id FROM consumer c
WHERE c.active_flag = 'Y'
AND (c.frequency = 'Q')
AND c.consumer_id NOT IN(
SELECT consumer_id
FROM (SELECT s.consumer_id
我試圖找到發票清單,其中發票ID不會出現在具有某些參數的另一個表中。這個問題一直在困擾我整天。我試過的變化不存在的,而不是 這裏是我最終想要達到的sql: SELECT * FROM invoices
JOIN invoiceitem
WHERE invoiceitem.class = 'ITEM'
AND invoices.rmlist >= $date1
AND invoices.rm