I have a table which has a foreign key that links to a primary key in another table. That id has information on it in which I want it to show while having a sum on the information. Is there a way to do it?
To clarify here's a code that I'm attempting:
Select `First_Name`, `Last_Name`, `Cart_Item`, Sum(`Ammount`) as "Item Amount" from `transx`, `employee_name` where `Employee`=1 and employee_name.`id` = 1 group by `Cart_Item`;
The Cart_Item links to a table that has the cart item name and the manufacturer (which has the names "Name" and "ManufactureName" respectively). I want to put that name, with the sum for each group (with the item acting as a particular group) in the same query.