added extra sql scripts, changed "fourth base" to "None base"
This commit is contained in:
parent
ccede38d49
commit
7f23235709
2
games.py
2
games.py
|
@ -829,7 +829,7 @@ def base_string(base):
|
|||
elif base == 3:
|
||||
return "third"
|
||||
elif base == 4:
|
||||
return "fourth"
|
||||
return "None"
|
||||
|
||||
class weather(object):
|
||||
name = "Sunny"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
SELECT name,
|
||||
SELECT name, team_name,
|
||||
plate_appearances - (walks_taken + sacrifices) as atbats,
|
||||
ROUND(hits*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as average,
|
||||
ROUND(total_bases*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as slg,
|
||||
ROUND((walks_taken + hits)*1.0/plate_appearances*1.0,3) as obp,
|
||||
ROUND((walks_taken + hits)*1.0/plate_appearances*1.0,3) + ROUND(total_bases*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as ops
|
||||
FROM stats WHERE plate_appearances > 50
|
||||
ORDER BY ops DESC;
|
||||
ORDER BY average DESC;
|
|
@ -1,4 +1,4 @@
|
|||
SELECT name,
|
||||
SELECT name, team_name,
|
||||
outs_pitched,
|
||||
ROUND(runs_allowed*27.0/(outs_pitched*1.0),3) as era,
|
||||
ROUND((walks_allowed+hits_allowed)*3.0/(outs_pitched*1.0),3) as whip,
|
8
sql scripts/ops leaders.sql
Normal file
8
sql scripts/ops leaders.sql
Normal file
|
@ -0,0 +1,8 @@
|
|||
SELECT name, team_name,
|
||||
plate_appearances - (walks_taken + sacrifices) as atbats,
|
||||
ROUND(hits*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as average,
|
||||
ROUND(total_bases*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as slg,
|
||||
ROUND((walks_taken + hits)*1.0/plate_appearances*1.0,3) as obp,
|
||||
ROUND((walks_taken + hits)*1.0/plate_appearances*1.0,3) + ROUND(total_bases*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as ops
|
||||
FROM stats WHERE plate_appearances > 50
|
||||
ORDER BY ops DESC;
|
BIN
sql scripts/sql scripts.zip
Normal file
BIN
sql scripts/sql scripts.zip
Normal file
Binary file not shown.
9
sql scripts/strikeouts per walks leaders.sql
Normal file
9
sql scripts/strikeouts per walks leaders.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
SELECT name, team_name,
|
||||
outs_pitched,
|
||||
ROUND(runs_allowed*27.0/(outs_pitched*1.0),3) as era,
|
||||
ROUND((walks_allowed+hits_allowed)*3.0/(outs_pitched*1.0),3) as whip,
|
||||
ROUND(walks_allowed*27.0/(outs_pitched*1.0),3) as bbper9,
|
||||
ROUND(strikeouts_given*27.0/(outs_pitched*1.0),3) as kper9,
|
||||
ROUND(strikeouts_given*1.0/walks_allowed*1.0,3) as kperbb
|
||||
FROM stats WHERE outs_pitched > 150
|
||||
ORDER BY kperbb ASC;
|
9
sql scripts/whip leaders.sql
Normal file
9
sql scripts/whip leaders.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
SELECT name, team_name,
|
||||
outs_pitched,
|
||||
ROUND(runs_allowed*27.0/(outs_pitched*1.0),3) as era,
|
||||
ROUND((walks_allowed+hits_allowed)*3.0/(outs_pitched*1.0),3) as whip,
|
||||
ROUND(walks_allowed*27.0/(outs_pitched*1.0),3) as bbper9,
|
||||
ROUND(strikeouts_given*27.0/(outs_pitched*1.0),3) as kper9,
|
||||
ROUND(strikeouts_given*1.0/walks_allowed*1.0,3) as kperbb
|
||||
FROM stats WHERE outs_pitched > 150
|
||||
ORDER BY whip ASC;
|
Loading…
Reference in a new issue