Files
doris/regression-test/suites/github_events_p2/sql/affinityByIssuesAndPRs1.sql

15 lines
504 B
SQL

SELECT
repo_name,
count() AS prs,
count(distinct actor_login) AS authors
FROM github_events
WHERE (event_type = 'PullRequestEvent') AND (action = 'opened') AND (actor_login IN
(
SELECT actor_login
FROM github_events
WHERE (event_type = 'PullRequestEvent') AND (action = 'opened') AND (repo_name IN ('yandex/ClickHouse', 'ClickHouse/ClickHouse'))
)) AND (lower(repo_name) NOT LIKE '%clickhouse%')
GROUP BY repo_name
ORDER BY authors DESC, prs DESC, length(repo_name) DESC
LIMIT 50