OPS

OPS Leaders

“);
echo(“

“);
echo(“

All Time

“);

$get_OPS_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)+(SUM(B.H)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP))/(SUM(B.AB)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP)+SUM(B.SH)) AS OPS FROM `batting` B, `people` P WHERE B.playerID=P.playerID GROUP BY B.playerID HAVING SUM(B.AB)>500 ORDER BY OPS DESC LIMIT 500”);

echo(“

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

“);
}
echo(“

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

“);

echo(“

Active

“);

$get_active_OPS_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) + (SUM(B.H)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP))/(SUM(B.AB)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP)+SUM(B.SH)) AS OPS 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 OPS DESC LIMIT 500”);

echo(“

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

“);
}
echo(“

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

“);

echo(“

“);

?>

Trackback

no comment until now

Sorry, comments closed.