Skip to content

Commit 6810f0b

Browse files
committed
fix: remove subscribers revert some changes
1 parent 89a15eb commit 6810f0b

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

Doppler.ReportingApi/Infrastructure/CampaignRepository.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ FROM dbo.usertimezone timezone
3131
SELECT
3232
RPT.[IdUser],
3333
RPT.[Date],
34-
SUM(RPT.[Subscribers]) [Subscribers],
3534
SUM(RPT.[Sent]) [Sent],
3635
SUM(RPT.[Opens]) [Opens],
3736
SUM(RPT.[Clicks]) [Clicks],
@@ -46,8 +45,7 @@ FROM dbo.usertimezone timezone
4645
DATEADD(MINUTE, @timezone, C.[UTCScheduleDate])
4746
AS DATE
4847
) AS [Date]
49-
,ISNULL(C.[AmountSentSubscribers],0) [Subscribers]
50-
,(ISNULL(C.[DistinctOpenedMailCount],0) + ISNULL(C.[UnopenedMailCount],0)) AS [Sent]
48+
,ISNULL(C.[AmountSentSubscribers],0) [Sent]
5149
,ISNULL(C.[DistinctOpenedMailCount],0) [Opens]
5250
,ISNULL(C.[DistinctClickCount],0) [Clicks]
5351
,ISNULL(C.[HardBouncedMailCount],0) [Hard]
@@ -64,8 +62,7 @@ JOIN [dbo].[User] U WITH (NOLOCK)
6462
WHERE
6563
U.[Email] = @userName
6664
AND C.[Status] IN (5,9,10)
67-
AND C.UTCScheduleDate >= @startDate
68-
AND C.UTCScheduleDate < @endDate
65+
AND C.[UTCScheduleDate] BETWEEN @startDate AND @endDate
6966
AND C.[IdTestCampaign] IS NULL
7067
AND C.[IdScheduledTask] IS NULL
7168
AND (C.TestABCategory IS NULL OR C.TestABCategory = 3)
@@ -78,7 +75,6 @@ UNION ALL
7875
DATEADD(MINUTE, @timezone, C.[UTCScheduleDate])
7976
AS DATE
8077
) AS [Date]
81-
,0 [Subscribers]
8278
,0 [Sent]
8379
,0 [Opens]
8480
,0 [Clicks]
@@ -106,8 +102,7 @@ JOIN [dbo].[User] U WITH (NOLOCK)
106102
WHERE
107103
U.[Email] = @userName
108104
AND C.[Status] IN (5,9,10)
109-
AND C.UTCScheduleDate >= @startDate
110-
AND C.UTCScheduleDate < @endDate
105+
AND C.[UTCScheduleDate] BETWEEN @startDate AND @endDate
111106
AND S.[IdSubscribersStatus] = 5
112107
GROUP BY
113108
S.[IdUser]

0 commit comments

Comments
 (0)