Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

History

History
History
80 lines (80 loc) 路 1.65 KB

File metadata and controls

80 lines (80 loc) 路 1.65 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
with commits as (
select committer_id as actor_id,
dup_committer_login as actor,
dup_repo_name as repo,
dup_created_at as created_at,
sha
from
gha_commits
where
committer_id is not null
and (lower(dup_committer_login) {{exclude_bots}})
union select author_id as actor_id,
dup_author_login as actor,
dup_repo_name as repo,
dup_created_at as created_at,
sha
from
gha_commits
where
author_id is not null
and (lower(dup_author_login) {{exclude_bots}})
union select dup_actor_id as actor_id,
dup_actor_login as actor,
dup_repo_name as repo,
dup_created_at as created_at,
sha
from
gha_commits
where
dup_actor_id is not null
and (lower(dup_actor_login) {{exclude_bots}})
), committers as (
select c.actor,
c.repo,
coalesce(aa.company_name, '(Unknown)') as company,
count(distinct c.sha) as commits
from
commits c
left join
gha_actors_affiliations aa
on
c.actor_id = aa.actor_id
and c.created_at >= aa.dt_from
and c.created_at < aa.dt_to
group by
actor,
repo,
company
order by
commits desc
), all_commits as (
select sum(commits) as cnt
from
committers
), data as (
select c.repo,
row_number() over cumulative_commits as rank_number,
c.actor,
c.company,
c.commits,
round((c.commits * 100.0) / a.cnt, 5) as percent,
a.cnt as all_commits
from
committers c,
all_commits a
window
cumulative_commits as (
partition by c.repo
order by c.commits desc, c.actor asc
range between unbounded preceding
and current row
)
)
select
*
from
data
where
rank_number <= 3
;
Morty Proxy This is a proxified and sanitized view of the page, visit original site.