To cover my bases, because you posted in "general" and not "database", you may be after some non SQL code.
Try this, although, im not sure what would happen with thousands of products.
<?php
$products = array(
"Chocolate" => array("ComA" => 15, "ComB" => 20, "ComC"=> 25, "ComD" => 30),
"Fruit" => array("ComA" => 100, "ComB" => 5, "ComC"=> 4),
"Laptop" => array("IBM" => 2000, "Dell" => 1899, "Chuckycheese"=> 5)
);
echo "<table border=1>";
echo "<tr><td>Product<td>Company<td>MAX<td>MIN";
foreach ($products as $name => $value)
{
echo "<tr><td>$name<td>" . implode(", ",array_keys($value)).
"<td>" . max($value) . "<td>" . min($value);
}
echo "</table>";
?>