You can't with only a sql statment. You need to code some php.
You can do something like:
$sql="select * from xxx order by number asc"
$flag = "";
while (more rows to fecth) {
$row = fetch next row
if ($row[0] != $flag) {
echo("Number <BR>");
$flag = $row[0];
}
echo("$row[0]<BR>");
}
Hope it helps