vwEmailJobStats
Fields
Field | Field Type | Null | Description |
---|---|---|---|
EmailJobID | int | ||
Sent | int | yes | |
Opened | int | ||
Bounced | int |
Definition
Copy
CREATE VIEW [dbo].[vwEmailJobStats]
AS
SELECT
ej.[ID] As [EmailJobID],
Count(ejr.[ID]) As [Sent],
ISNULL(Sum(Cast(ejr.[Opened] AS int)), 0) As [Opened],
ISNULL(Sum(Cast(ejr.[DSNed] AS int)), 0) As [Bounced]
FROM
[dbo].[EmailJob] ej
INNER JOIN [dbo].[EmailJob_Recipient] ejr
ON ej.[ID] = ejr.[EmailJobID]
GROUP BY ej.[ID]