Use
recipient NOT IN (SELECT ...)
e author NOT IN (SELECT ...)
para excluir os participantes que correspondem às suas condições 1 e 2. SELECT
hia.query_result_id,
hia.url,
hia.title,
hia.article_publication_day,
hia.media_name,
hia.author_full_name,
hia.author_first_name,
hia.author_last_name,
hia.author_email,
ces.sent_at
FROM
Hobby_ideas_articles hia
LEFT JOIN
Past_Customer_sent_messages ces
ON
hia.author = ces.recipient
AND ces.recipient NOT IN (
SELECT recipient
FROM Past_Customer_sent_messages
WHERE sent_at > DATE_SUB(NOW(), INTERVAL 3 HOUR)
)
WHERE
hia.hobby_id = HOBBY_ID_INPUT_I_HAVE AND
hia.author IS NOT NULL
AND hia.author NOT IN (
SELECT recipient
FROM Past_Customer_sent_messages
WHERE customer_id = CUSTOMER_ID_INPUT_I_HAVE
AND sent_at > DATE_SUB(NOW(), INTERVAL 30 DAY)
)
A condição em
ces
tem que estar no ON
cláusula para que você obtenha sent_at = NULL
para artigos que não têm linhas correspondentes.