High School: 239 College: 378 Undrafted: 203 Drafted: 617 SELECT draft_year,college,COUNT(*) as cnt FROM (SELECT player_id,team_id,first_name,last_name,college,draft_year,draft_round FROM `players` WHERE draft_year=2029) as p WHERE 1 GROUP BY draft_year,college ORDER BY draft_year,college SELECT college,COUNT(*) as cnt FROM ( SELECT player_id,team_id,first_name,last_name,college,if(draft_year>0,1,0) as drafted,draft_year,draft_round FROM `players` WHERE draft_league_id=100 AND draft_year=2028 ) as p GROUP BY college SELECT draft_college_status,COUNT(*) as cnt FROM ( SELECT player_id,team_id,first_name,last_name,college,age,(age-2029+draft_year) as draft_age,if((age-2029+draft_year)<20,0,1) as draft_college_status,if(draft_year>0,1,0) as drafted,draft_year,draft_round FROM `players` WHERE draft_league_id=100 AND draft_year=2028 ORDER BY college,age DESC ) as p GROUP BY draft_college_status SELECT draft_college_status,COUNT(*) as CNT FROM( SELECT p.*,pcs.pa,pcs.war,pcs.years FROM (SELECT player_id,position,team_id,first_name,last_name,college,age,(age-2029+draft_year) as draft_age,if((age-2029+draft_year)<20,0,1) as draft_college_status,if(draft_year>0,1,0) as drafted,draft_year,draft_round FROM `players` WHERE draft_league_id=100 AND draft_year=2021 AND position!=1 ORDER BY college,age DESC) as p JOIN (SELECT player_id,SUM(pa) as pa,SUM(war) as war,COUNT(DISTINCT year) as years FROM players_career_batting_stats WHERE league_id=100 AND split_id=1 GROUP BY player_id) as pcs ON p.player_id=pcs.player_id ) as x GROUP BY draft_college_status SELECT draft_year,draft_college_status,COUNT(*) as CNT FROM( SELECT p.*,pcs.ip,pcs.war,pcs.years FROM (SELECT player_id,position,team_id,first_name,last_name,college,age,(age-2029+draft_year) as draft_age,if((age-2029+draft_year)<20,0,1) as draft_college_status,if(draft_year>0,1,0) as drafted,draft_year,draft_round FROM `players` WHERE draft_league_id=100 AND draft_year>=2017 AND position=1 ORDER BY college,age DESC) as p JOIN (SELECT player_id,SUM(ip) as ip,SUM(war) as war,COUNT(DISTINCT year) as years FROM players_career_pitching_stats WHERE league_id=100 AND split_id=1 GROUP BY player_id) as pcs ON p.player_id=pcs.player_id ) as x GROUP BY draft_year,draft_college_status ORDER BY draft_year,draft_college_status SELECT p.*,pcs.ip,pcs.war,pcs.years FROM (SELECT player_id,position,team_id,first_name,last_name,college,age,(age-2029+draft_year) as draft_age,if((age-2029+draft_year)<20,0,1) as draft_college_status,if(draft_year>0,1,0) as drafted,draft_year,draft_round,draft_supplemental FROM `players` WHERE draft_league_id=100 AND draft_year>0 AND draft_year<2017 AND position=1 ORDER BY college,age DESC) as p JOIN (SELECT player_id,SUM(ip) as ip,SUM(war) as war,COUNT(DISTINCT year) as years FROM players_career_pitching_stats WHERE league_id=100 AND split_id=1 GROUP BY player_id) as pcs ON p.player_id=pcs.player_id