I ran a simple SQL to see how many 'running' journeys I have in my system. There are hundreds.
This is the data I want: To get a unique list of journeys in SFMC that have a journey status of "running" but there have been zero sends in the past three months.
Below is the SQL I've written. Issues I'm facing: I either get multiple rows (And if I manually delete it, it doesn't seem accurate) or I get data without Event Date.
Happy to get some recommendations on how to approach the overall objective too, not just the sql.
SELECT
j.VersionID,
j.JourneyID,
j.JourneyName,
j.VersionNumber,
j.CreatedDate,
j.LastPublishedDate,
j.ModifiedDate,
j.JourneyStatus,
s.EventDate
FROM _Journey j
LEFT JOIN _JourneyActivity ja ON ja.VersionID = j.VersionID
LEFT JOIN _Sent s ON s.TriggererSendDefinitionObjectID = ja.JourneyActivityObjectID
WHERE j.JourneyStatus = 'Running'
AND s.EventDate <= DATEADD(month, -3, GETDATE())
GROUP BY
j.VersionID,
j.JourneyID,
j.JourneyName,
j.VersionNumber,
j.CreatedDate,
j.LastPublishedDate,
j.ModifiedDate,
j.JourneyStatus,
s.EventDate