We want to get a Data Extension with only de emails of subscribers that opened certain JobIDs. I ran this SQL Activity but the targeted Data Extension shows 0 records after it finished running.
What could be wrong?
SELECT DISTINCT s.SubscriberKey
FROM _Sent s
WHERE
s.JobID = 222861 OR
s.JobID = 222863 OR
s.JobID = 222865 OR
s.JobID = 222868 OR
s.JobID = 222869 OR
s.JobID = 222870 OR
s.JobID = 222871 OR
s.JobID = 222872 OR
s.JobID = 222875 OR
s.JobID = 222878 OR
s.JobID = 222889 OR
s.JobID = 222891 OR
s.JobID = 222893 OR
s.JobID = 222894 OR
s.JobID = 222895 OR
s.JobID = 222896 OR
s.JobID = 222898 OR
s.JobID = 222899 OR
s.JobID = 223022 OR
s.JobID = 223023 OR
s.JobID = 223024 OR
s.JobID = 223025 OR
s.JobID = 223026 OR
s.JobID = 223027
and s.SubscriberKey IN (
SELECT o.SubscriberKey
FROM _Open o
WHERE o.JobID = s.JobID
AND
o.SubscriberKey = s.SubscriberKey
)
(s.JobID = .... OR s.JobID = ..) AND s.SubscriberKey IN(
to provide logic as you initially intended. techonthenet.com/sql/and_or.php