SLUG

Slugging Percentage Leaders

“);
echo(“

“);
echo(“

All Time

“);

$get_SLUG_leaders=$conn->query(“SELECT P.nameFirst, P.nameLast, P.finalGame, (SUM(B.H)-SUM(B.2B)-SUM(B.3B)-SUM(B.HR)+2*SUM(B.2B)+3*SUM(B.3B)+4*SUM(B.HR))/SUM(AB) AS SLUG FROM `batting` B, `people` P WHERE B.playerID=P.playerID GROUP BY B.playerID HAVING SUM(B.AB)>500 ORDER BY SLUG DESC LIMIT 500”);

echo(“

“);
while($row=$get_SLUG_leaders->fetch_assoc()){
echo(“

“);
}
echo(“

Name SLUG Final Game
$row[nameFirst] $row[nameLast] $row[SLUG] $row[finalGame]

“);

echo(“

Active

“);

$get_active_SLUG_leaders=$conn->query(“SELECT P.nameFirst, P.nameLast, P.finalGame, (SUM(B.H)-SUM(B.2B)-SUM(B.3B)-SUM(B.HR)+2*SUM(B.2B)+3*SUM(B.3B)+4*SUM(B.HR))/SUM(AB) AS SLUG FROM `batting` B, `people` P WHERE B.playerID=P.playerID AND (LEFT(P.finalGame,4)=’2019′ OR LEFT(P.finalGame,4)=’2018′) GROUP BY B.playerID HAVING SUM(B.AB)>25 ORDER BY SLUG DESC LIMIT 500”);

echo(“

“);
while($row=$get_active_SLUG_leaders->fetch_assoc()){
echo(“

“);
}
echo(“

Name SLUG Final Game
$row[nameFirst] $row[nameLast] $row[SLUG] $row[finalGame]

“);

echo(“

“);

?>

Trackback

no comment until now

Sorry, comments closed.