是否可以改进以下查询:
SELECT *
FROM search s left join search_criteria sc ON s.id = sc.search_id
WHERE sc.deleted_at IS NOT NULL
AND s.id NOT IN
( SELECT s.id
FROM search s
left join search_criteria sa ON s.id = sc.search_id
WHERE sc.deleted_at IS NULL
)
GROUP BY s.id
谢谢