Aggregate functions summarise many rows: COUNT, SUM, AVG, MIN, MAX. GROUP BY makes one summary per group.
SELECT products.name, SUM(orders.quantity) AS sold FROM orders JOIN products ON products.id = orders.product_id GROUP BY products.name HAVING SUM(orders.quantity) > 10 ORDER BY sold DESC;