@@ -17,7 +17,14 @@ NODE top_member_org_copy_member_activity_count
1717SQL >
1818 SELECT memberId, count(*) AS activityCount
1919 FROM activityRelations_deduplicated_cleaned_ds
20- WHERE (timestamp >= (now() - toIntervalYear(10))) AND (timestamp < now())
20+ WHERE
21+ (timestamp >= (now() - toIntervalYear(10)))
22+ AND (timestamp < now())
23+ AND (type, platform) IN (
24+ SELECT activityType, platform
25+ FROM activityTypes_filtered at
26+ WHERE at.isCodeContribution = true OR at.isCollaboration = true
27+ )
2128 GROUP BY memberId
2229 ORDER BY activityCount DESC
2330 LIMIT 100
@@ -41,7 +48,15 @@ NODE top_member_org_copy_organization_activity_count
4148SQL >
4249 SELECT organizationId, count(*) AS activityCount
4350 FROM activityRelations_deduplicated_cleaned_ds
44- WHERE (timestamp >= (now() - toIntervalYear(10))) AND (timestamp < now()) AND organizationId != ''
51+ WHERE
52+ (timestamp >= (now() - toIntervalYear(10)))
53+ AND (timestamp < now())
54+ AND organizationId != ''
55+ AND (type, platform) IN (
56+ SELECT activityType, platform
57+ FROM activityTypes_filtered at
58+ WHERE at.isCodeContribution = true OR at.isCollaboration = true
59+ )
4560 GROUP BY organizationId
4661 ORDER BY activityCount DESC
4762 LIMIT 100
0 commit comments