SELECT p.id, p.name, sum(o.amount) AS total
FROM products AS p
INNER JOIN orders AS o ON o.product_id = p.id
GROUP BY p.id
You do have to do a left outer join like that:
SELECT p.id, p.name, IFNULL(sum(o.amount), 0) AS total FROM products AS p LEFT OUTER JOIN orders AS o ON o.product_id = p.id GROUP BY p.id
the [OUTER]-Keyword is optional and can be left out.
Have a look at this question: MySQL: Typecasting NULL to 0
But sorry, this really is so basic, you can google it all around the world in every language...