/ ---
/ jupyter:
/   jupytext:
/     text_representation:
/       extension: .q
/       format_name: light
/       format_version: '1.5'
/       jupytext_version: 1.14.4
/   kernelspec:
/     display_name: MariaDB
/     language: SQL
/     name: mariadb_kernel
/ ---

use test;

show columns from commiters;

/ ### Top 10 Individual Commiters 2009-2019

select Name,
       count(*) as Total_Commits,
       sum(Files_Changed) as Total_Files_Changed,
       sum(insertions) as Total_Lines_Added,
       sum(Deletions) as Total_Lines_Deleted from commiters
       group by Name
       order by Total_Lines_Deleted DESC
       LIMIT 10;

/ ### See what magic commands are available to get some charts

%lsmagic

/ ### Proportion of Total Commits for Top 10 Contributors

%pie y='Total_Commits' index='Name' legend=False ylabel=''

/ ### Let's see some GitHub Pull Request statistics for MariaDB/server

select * from github_prs limit 1;

/ ### The most prolific PRs creators

select author,
       count(*) as Number_Of_PRs
       from github_prs
       group by author
       order by Number_Of_PRs DESC
       limit 10;

/ ### Contributors Frustration Metric

select author,
       count(*) as PRs_Still_OPEN
       from github_prs
       where state='OPEN'
       group by author
       order by PRs_Still_OPEN DESC
       LIMIT 5;
       

%bar x='author' y='PRs_Still_OPEN' rot=0 xlabel=''

/ ### Want to do real complex stuff?

%df fosdem_dataset.csv

%df dataset2.csv



StarcoderdataJupyterScriptsDedupFiltered