Skip to content

Commit 4a4a178

Browse files
ccerv1claude
andcommitted
fix: add is_crypto=1, is_category=0 filters to ecosystem ranking queries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2f66c1d commit 4a4a178

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

notebooks/data/metric-definitions/activity.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ def _(mo):
136136
SELECT MAX(day)
137137
FROM oso.stg_opendevdata__eco_mads
138138
)
139+
AND e.is_crypto = 1
140+
AND e.is_category = 0
139141
ORDER BY m.all_devs DESC
140142
LIMIT 15
141143
```
@@ -160,6 +162,8 @@ def _(mo, pyoso_db_conn):
160162
SELECT MAX(day)
161163
FROM oso.stg_opendevdata__eco_mads
162164
)
165+
AND e.is_crypto = 1
166+
AND e.is_category = 0
163167
ORDER BY m.all_devs DESC
164168
LIMIT 15
165169
""",

notebooks/data/metric-definitions/alignment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ def _(mo):
338338
FROM oso.stg_opendevdata__eco_mads
339339
)
340340
AND (m.exclusive_devs + m.multichain_devs) > 0
341+
AND e.is_crypto = 1
342+
AND e.is_category = 0
341343
ORDER BY m.exclusive_devs + m.multichain_devs DESC
342344
LIMIT 20
343345
```
@@ -364,6 +366,8 @@ def _(mo, pyoso_db_conn):
364366
FROM oso.stg_opendevdata__eco_mads
365367
)
366368
AND (m.exclusive_devs + m.multichain_devs) > 0
369+
AND e.is_crypto = 1
370+
AND e.is_category = 0
367371
ORDER BY m.exclusive_devs + m.multichain_devs DESC
368372
LIMIT 20
369373
""",

notebooks/data/metric-definitions/experience.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ def _(mo):
9090
JOIN oso.stg_opendevdata__ecosystems AS e
9191
ON m.ecosystem_id = e.id
9292
WHERE m.day = (SELECT MAX(day) FROM oso.stg_opendevdata__eco_mads)
93+
AND e.is_crypto = 1
94+
AND e.is_category = 0
9395
ORDER BY m.all_devs DESC
9496
LIMIT 15
9597
```
@@ -113,6 +115,8 @@ def _(mo, pyoso_db_conn):
113115
JOIN oso.stg_opendevdata__ecosystems AS e
114116
ON m.ecosystem_id = e.id
115117
WHERE m.day = (SELECT MAX(day) FROM oso.stg_opendevdata__eco_mads)
118+
AND e.is_crypto = 1
119+
AND e.is_category = 0
116120
ORDER BY m.all_devs DESC
117121
LIMIT 15
118122
""",

0 commit comments

Comments
 (0)