You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/rewards/11_goldActiveODOperatorSetRewards.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ WITH
17
17
active_rewards_modified AS (
18
18
SELECT
19
19
*,
20
-
CAST(@cutoffDate AS TIMESTAMP(6)) AS global_end_inclusive -- Inclusive means we DO USE this day as a snapshot
20
+
CAST(@cutoffDate AS TIMESTAMP(6)) + INTERVAL '1 day' - INTERVAL '1 second' AS global_end_inclusive -- Use end of cutoff day to include all rewards ending on cutoff date
21
21
FROM operator_directed_operator_set_rewards
22
22
WHERE end_timestamp >= TIMESTAMP '{{.rewardsStart}}'
23
23
AND start_timestamp <= TIMESTAMP '{{.cutoffDate}}'
Copy file name to clipboardExpand all lines: pkg/rewards/1_goldActiveRewards.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ create table {{.destTableName}} as
15
15
WITH active_rewards_modified as (
16
16
SELECT *,
17
17
amount/(duration/86400) as tokens_per_day,
18
-
cast(@cutoffDate AS TIMESTAMP(6)) as global_end_inclusive -- Inclusive means we DO USE this day as a snapshot
18
+
cast(@cutoffDate AS TIMESTAMP(6)) + INTERVAL '1 day' - INTERVAL '1 second' as global_end_inclusive -- Use end of cutoff day to include all rewards ending on cutoff date
Copy file name to clipboardExpand all lines: pkg/rewards/7_goldActiveODRewards.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ WITH
17
17
active_rewards_modified AS (
18
18
SELECT
19
19
*,
20
-
CAST(@cutoffDate AS TIMESTAMP(6)) AS global_end_inclusive -- Inclusive means we DO USE this day as a snapshot
20
+
CAST(@cutoffDate AS TIMESTAMP(6)) + INTERVAL '1 day' - INTERVAL '1 second' AS global_end_inclusive -- Use end of cutoff day to include all rewards ending on cutoff date
21
21
FROM operator_directed_rewards
22
22
WHERE end_timestamp >= TIMESTAMP '{{.rewardsStart}}'
23
23
AND start_timestamp <= TIMESTAMP '{{.cutoffDate}}'
0 commit comments