Skip to content

Commit 110436d

Browse files
authored
fix: project insights (#3584)
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
1 parent 75c85a6 commit 110436d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/libs/tinybird/pipes/project_insights_copy.pipe

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SQL >
2121
CASE WHEN organizationId != '' THEN organizationId ELSE NULL END
2222
) AS activeOrganizationsLast365Days
2323
FROM activityRelations_deduplicated_cleaned_ds
24-
WHERE timestamp >= now() - INTERVAL 365 DAY
24+
WHERE timestamp <= now()
2525
GROUP BY segmentId
2626

2727
NODE project_insights_copy_previous_365_days_metrics
@@ -38,7 +38,7 @@ SQL >
3838
CASE WHEN organizationId != '' THEN organizationId ELSE NULL END
3939
) AS activeOrganizationsPrevious365Days
4040
FROM activityRelations_deduplicated_cleaned_ds
41-
WHERE timestamp >= now() - INTERVAL 730 DAY AND timestamp < now() - INTERVAL 365 DAY
41+
WHERE timestamp < now() - INTERVAL 365 DAY
4242
GROUP BY segmentId
4343

4444
NODE project_insights_copy_results

0 commit comments

Comments
 (0)