Skip to content
Computer screen displaying a SQL query and bounce rate report in a marketing automation platform interface.

The Ultimate Guide to Marketing Cloud Data Views (with Working SQL Examples)

Track Every Subscriber Interaction in Salesforce Marketing Cloud

If you’re using Salesforce Marketing Cloud to send emails but you’re not tapping into Data Views, you’re missing a goldmine of engagement data. These hidden system tables give you access to everything from email opens and clicks to bounces, complaints, and unsubscribes.

In this guide, we’ll walk through what Data Views are, how to use them, and share SQL queries you can actually use in Automation Studio—no fluff, no theory.

What Are Data Views in Marketing Cloud?

Data Views are system-generated tables within Salesforce Marketing Cloud that store subscriber behavior data. You can query them with SQL inside Automation Studio to monitor performance, build dynamic audiences, and automate cleanup tasks.

Unlike Data Extensions (DEs), Data Views are automatically maintained by the system, and contain historical data like:

  • Sends
  • Opens
  • Clicks
  • Unsubscribes
  • Bounces
  • Spam complaints

They’re your window into what subscribers are actually doing with your emails.

Why Use Data Views?

Here are just a few ways Data Views can help:

  • Measure campaign performance across sends and time
  • Build re-engagement audiences (e.g. non-openers in 90 days)
  • Identify high-bounce or high-complaint subscribers
  • Power Marketing Cloud dashboards and email reports
  • Automate segmentation with real behavior data

They’re especially useful for marketers who prefer data-driven campaigns, and RevOps teams who need to keep databases clean and compliant.

Important Things to Know

FeatureDetail
Accessed viaSQL Query Activity in Automation Studio
RetentionMost views hold data for 6 months, some as short as 30 days
CostNo additional cost — they’re built in
NamingAll views start with an underscore, like _Open, _Click

Top Marketing Cloud Data Views

Here are the most commonly used Data Views:

Data ViewDescription
_SentDetails on every email sent from your account
_OpenLogs each open (multiple if user opens more than once)
_ClickClick events, including URL and time
_BounceBounce events, including category (hard/soft)
_UnsubscribeRecords when someone unsubscribes from an email
_ComplaintSpam complaints (via “Report Spam”)
_SubscribersSubscriber key, status, opt-outs
_JobMetadata about the send job (email name, time, etc.)

More info: Salesforce documentation on Data Views

Working SQL Examples for Real Use Cases

All queries below are tested in Marketing Cloud and will work inside Automation Studio → SQL Query Activity.

Re-Engagement Audience: Who Hasn’t Opened in 90 Days

SELECT s.EmailAddress, s.SubscriberKey
FROM _Subscribers s
LEFT JOIN _Open o
ON s.SubscriberKey = o.SubscriberKey
AND o.EventDate >= DATEADD(day, -90, GETDATE())
WHERE o.SubscriberKey IS NULL
AND s.Status = ‘Active’

Use this to identify disengaged users for a winback campaign.

Unsubscribe Events from a Specific Campaign

SELECT u.SubscriberKey, u.EventDate, j.EmailName
FROM _Unsubscribe u
JOIN _Job j
ON u.JobID = j.JobID
WHERE j.EmailName LIKE ‘%Spring Promo%’

See how many people unsubscribed from a certain campaign or A/B test.

Hard Bounce Counts by Email Domain

SELECT
RIGHT(EmailAddress, LEN(EmailAddress) – CHARINDEX(‘@’, EmailAddress)) AS Domain,
COUNT(*) AS BounceCount
FROM _Bounce
WHERE BounceCategory = ‘Hard’
GROUP BY RIGHT(EmailAddress, LEN(EmailAddress) – CHARINDEX(‘@’, EmailAddress))

Useful for identifying problematic email domains.

Spam Complaints in the Last 7 Days

SELECT SubscriberKey, EventDate
FROM _Complaint
WHERE EventDate >= DATEADD(day, -7, GETDATE())

Good for compliance checks and alerting.

Total Sends by Email Name

SELECT j.EmailName, COUNT(*) AS TotalSent
FROM _Sent s
JOIN _Job j
ON s.JobID = j.JobID
GROUP BY j.EmailName

Get a simple rollup of sends by campaign.

Pro Tips for Using Data Views

  • Test with limits first: Add TOP 100 or a WHERE clause while testing
  • Use CAST carefully: Don’t assume dates and strings always match format
  • Monitor performance: Long-running queries can fail silently
  • Schedule wisely: Set your queries to run in off-peak hours

Use Cases for RevOps & Marketing

  • Automated data hygiene: Remove or flag high-bounce addresses
  • Journey optimization: Trigger different paths based on real behavior
  • Compliance reporting: Export opt-outs, bounces, and complaints
  • Campaign analytics: Build dashboards with SQL + DEs + email metrics

Related articles

Subscribe

Stay ahead with exclusive RevOps insights—delivered straight to your inbox. Subscribe now!