Código PHP:
$ensenanzasup = "SELECT * FROM jcgrm_granma_educacion WHERE tipo=1";
$resensenanzasup = mysql_query($ensenanzasup) or die(mysql_error());
$sum = 0;
while($suma = mysql_fetch_array($resensenanzasup)){
$sum += $suma['cantidad'];
}
echo "<tr>";
echo "<td class='padding tdalterno bold font'>Enseñanza Superior</td>";
echo "<td class='padding tdalterno bold font' align='center'>".$sum."</td>";
echo "</tr>";
while($row = mysql_fetch_assoc($resensenanzasup)){
echo "<tr>";
echo "<td class='padding font'>".$row['titulo']."</td>";
echo "<td class='padding font'>".$row['cantidad']."</td>";
echo "</tr>";
}