Excluding Test Sends from _Sent Queries
Why test sends pollute metrics
Preview and test sends appear in _Sent alongside production deployments. Including them inflates send counts and distorts open and click rates.
Join _Job to access send classification metadata, or filter known test subscriber keys used by your team.
Production sends only
Test and preview sends are tagged on _Job with Category = 'Test Send Emails'. Join _Job on JobID and exclude that category — the same pattern the DataViews.pro sandbox utility injects.
SELECT
s.JobID,
COUNT(DISTINCT s.SubscriberKey) AS ProductionSends
FROM _Sent s
JOIN _Job j ON s.JobID = j.JobID
WHERE s.EventDate >= DATEADD(day, -30, GETDATE())
AND j.Category != 'Test Send Emails'
GROUP BY s.JobID
Sandbox utility
DataViews.pro includes an "Exclude test sends" utility toggle that injects common test-send predicates when _Sent is in your selection.