Group by is the best, but whatever works i suppose. Here's the SQL: select ingredients.name, sum(recipeMakeup.Qty) from ingredients, production, recipes, recipeMakeup where production.productionDate = '$today' AND recipes.recipeID = recipeMakeup.recipeID AND recipeMakeup.ingredientID = ingredients.ingredientID AND production.recipeID = recipes.recipeID GROUP BY ingredients.name ORDER BY ingredientName ASC; basically, anything else that you want to select that is not aggregated (i.e. sum, avg, etc.) needs to also be in the group by statement. good luck!