First of all, don't select "*" unless you don't know what fields you want. Select the fields you want.
There are two possibilities. First is to use select sum(bsal) to get the total. But that would mean a second query, and the first query gives you all the information you need.
But you can't output the table until you've read all the records - you don't know what the total is until then. So you'll have to read all the records in one loop, and then have a second loop to write out the table.
$sql = "Select bsal, ta from amount";
$query = $DB->Query($sql);
$count = mysql_num_rows($query);
$bsal = array();
$ta = array();
for($i=0; $i<$count; $i++)
{
list($bsal[], $ta[]) = mysql_fetch_row($query);
}
$bsal_total = array_sum($bsal);
for($i=0; $i<$count; $i++)
{
echo $bsal[$i], $ta[$i], $bsal[$i]+$ta[$i], $bsal[$i]/$bsal_total, "whatever";
}