You have two questions here.
The first is by fetching values by get. Yes that would be trivial to do; you simply need to check if your provided value is available, and if so, you then go ahead and fetch it. That's simply a matter of structure like so:
// All of this code you have now goes here.
$_GET['Team_ID'] = stripslashes($_GET['Team_ID']);
$team_id = mysql_real_escape_string($_GET['Team_ID']);
$sql = 'SELECT Pos, FName, LName, ROUND((SUM(H)/SUM(AB)),3) AS AVG '
. ' FROM retired_batters '
. ' WHERE Team = \'' . $team_id . '\' '
. ' GROUP BY Pos, FName, LName'
. ' ORDER BY AVG DESC '
. ' LIMIT 10';
// continue with the rest of your code
I don't know what kind of results that AVG would be, but what you describe to what is currently in the code would indicate that AVG would be a fractional value: AVG=0.885 for example.
In the printf code:
<td align="right">%d</td>', ...);
Those replacements are %s = string, and %d = integer. If you have 0.885 for example, casting that to an integer would result in 0. What you do is use %f to indicate that it is a double value instead, and you can autoround it with the modifiers. So instead of %d you can use %0.3f which would show three significant digits and the 0.
That is a guess as to what the issue is since it sounds like the AVG pulls the correct results, its simply display as int.
This is one reason why printf is often not liked by people, but I personally feel that the ability to modify the output structure and perform argument location swapping trumps that of accidentally providing the incorrect datatype.