Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ SQL >
CAST(coalesce(c.commits, 0) AS Float64)
/ CAST(coalesce(c.unique_authors, 1) AS Float64) DESC
) as rank,
p.id,
p.segmentId,
p.name,
p.slug,
p.logoUrl,
p.id as id,
p.segmentId as segmentId,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
(coalesce(c.commits, 0) / coalesce(c.unique_authors, 1)) as value
FROM leaderboards_avg_commits_per_author_projects p
INNER JOIN leaderboards_avg_commits_per_author_activities c ON p.segmentId = c.segmentId
16 changes: 8 additions & 8 deletions services/libs/tinybird/pipes/leaderboards_codebase_size.pipe
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ DESCRIPTION >

SQL >
SELECT
row_number() OVER (ORDER BY coalesce(o.linesChanged, 0) DESC) as rank,
p.id,
p.segmentId,
p.name,
p.slug,
p.logoUrl,
CAST(coalesce(o.linesChanged, 0) as Float64) as value
row_number() OVER (ORDER BY coalesce(o.lineDifference, 0) DESC) as rank,
p.id as id,
p.segmentId as segmentId,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
CAST(coalesce(o.lineDifference, 0) as Float64) as value
FROM leaderboards_codebase_size_projects p
INNER JOIN leaderboards_codebase_size_activities o ON p.segmentId = o.segmentId
WHERE o.linesChanged > 0
WHERE o.lineDifference > 0
ORDER BY value DESC
16 changes: 8 additions & 8 deletions services/libs/tinybird/pipes/leaderboards_commits.pipe
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ DESCRIPTION >
Counts total git commits for each project in the last 12 months

SQL >
SELECT segmentId, count(activityId) as commits
SELECT segmentId, count() as commits
FROM activityRelations_deduplicated_cleaned_ds
WHERE
timestamp >= now() - INTERVAL 12 MONTH
AND timestamp < now()
AND activityId != ''
AND (type = 'authored-commit' OR type = 'committed-commit')
AND type = 'authored-commit'
AND platform = 'git'
GROUP BY segmentId

Expand All @@ -38,7 +38,7 @@ SQL >
timestamp >= now() - INTERVAL 24 MONTH
AND timestamp < now() - INTERVAL 12 MONTH
AND activityId != ''
AND (type = 'authored-commit' OR type = 'committed-commit')
AND type = 'authored-commit'
AND platform = 'git'
GROUP BY segmentId

Expand All @@ -49,11 +49,11 @@ DESCRIPTION >
SQL >
SELECT
row_number() OVER (ORDER BY coalesce(o.commits, 0) DESC) as rank,
p.id,
p.segmentId,
p.name,
p.slug,
p.logoUrl,
p.id as id,
p.segmentId as segmentId,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
cast(coalesce(o.commits, 0) as Float64) as value,
cast(coalesce(pp.commits, 0) as Float64) as previousPeriodValue
FROM leaderboards_commits_projects p
Expand Down
3 changes: 0 additions & 3 deletions services/libs/tinybird/pipes/leaderboards_copy.pipe
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ DESCRIPTION >
Unions all leaderboard results with their respective type identifiers for consolidated querying

SQL >
SELECT *, 0.0 as previousPeriodValue, 'longest-running' as leaderboardType
FROM leaderboards_project_first_commit
UNION ALL
SELECT *, 'active-contributors' as leaderboardType
FROM leaderboards_project_active_contributors
UNION ALL
Expand Down
8 changes: 4 additions & 4 deletions services/libs/tinybird/pipes/leaderboards_issue_response.pipe
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ DESCRIPTION >
SQL >
SELECT
row_number() OVER (ORDER BY coalesce(o.averageResponseTimeSeconds, 0) ASC) as rank,
p.id,
p.id as id,
p.segmentId as segmentId,
p.name,
p.slug,
p.logoUrl,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
coalesce(o.averageResponseTimeSeconds, 0) as value,
coalesce(pp.averageResponseTimeSeconds, 0) as previousPeriodValue
FROM leaderboards_issue_response_projects p
Expand Down
8 changes: 4 additions & 4 deletions services/libs/tinybird/pipes/leaderboards_merge_time.pipe
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ DESCRIPTION >
SQL >
SELECT
row_number() OVER (ORDER BY coalesce(o.averageMergeTimeSeconds, 0) ASC) as rank,
p.id,
p.id as id,
p.segmentId as segmentId,
p.name,
p.slug,
p.logoUrl,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
cast(coalesce(o.averageMergeTimeSeconds, 0) as Float64) as value,
cast(coalesce(pp.averageMergeTimeSeconds, 0) as Float64) as previousPeriodValue
FROM leaderboards_merge_time_projects p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ DESCRIPTION >
SQL >
SELECT
row_number() OVER (ORDER BY coalesce(c.contributor_count, 0) DESC) as rank,
p.id,
p.segmentId,
p.name,
p.slug,
p.logoUrl,
p.id as id,
p.segmentId as segmentId,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
cast(coalesce(c.contributor_count, 0) as Float64) as value,
cast(coalesce(pp.contributor_count, 0) as Float64) as previousPeriodValue
FROM leaderboards_project_active_contributors_projects p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ DESCRIPTION >
SQL >
SELECT
row_number() OVER (ORDER BY coalesce(o.organization_count, 0) DESC) as rank,
p.id,
p.segmentId,
p.name,
p.slug,
p.logoUrl,
p.id as id,
p.segmentId as segmentId,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
cast(coalesce(o.organization_count, 0) as Float64) as value,
cast(coalesce(pp.organization_count, 0) as Float64) as previousPeriodValue
FROM leaderboards_project_active_organizations_projects p
Expand Down

This file was deleted.

10 changes: 5 additions & 5 deletions services/libs/tinybird/pipes/leaderboards_resolution_rate.pipe
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ NODE leaderboards_resolution_rate_results
SQL >
SELECT
row_number() OVER (ORDER BY resolutionRate DESC) as rank,
p.id,
p.segmentId,
p.name,
p.slug,
p.logoUrl,
p.id as id,
p.segmentId as segmentId,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
c.resolutionRate as value
FROM leaderboards_resolution_rate_projects p
INNER JOIN leaderboards_resolution_rate_activities c ON p.segmentId = c.segmentId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ DESCRIPTION >
Counts total git commits for each project

SQL >
SELECT segmentId, count(activityId) as commits
SELECT segmentId, count() as commits
FROM activityRelations_deduplicated_cleaned_ds
WHERE
activityId != ''
AND (type = 'authored-commit' OR type = 'committed-commit')
AND platform = 'git'
WHERE activityId != '' AND type = 'authored-commit' AND platform = 'git'
GROUP BY segmentId

NODE leaderboards_small_project_commit_results
Expand All @@ -33,11 +30,11 @@ DESCRIPTION >
SQL >
SELECT
row_number() OVER (ORDER BY coalesce(o.commits, 0) DESC) as rank,
p.id,
p.segmentId,
p.name,
p.slug,
p.logoUrl,
p.id as id,
p.segmentId as segmentId,
p.name as name,
p.slug as slug,
p.logoUrl as logoUrl,
cast(coalesce(o.commits, 0) as Float64) as value
FROM leaderboards_small_project_commit_projects p
INNER JOIN leaderboards_small_project_commit_activities o ON p.segmentId = o.segmentId
Expand Down
Loading