-- Top issue authors across all repos
SELECT
    author,
    COUNT(*) as issue_count,
    COUNT(*) FILTER (WHERE state = 'open') as open,
    COUNT(*) FILTER (WHERE state = 'closed') as closed
FROM read_parquet('hf://datasets/open-index/open-github-issues/data/issues/**/0.parquet')
WHERE is_pull_request = false
GROUP BY author
ORDER BY issue_count DESC
LIMIT 20;
