I have the 1st table (tblProduct
) which contains 6 columns.
ProdID, BrandName, ProdType, Manuf, ProdDescript, Price
This table allocates a price to a product.
The 2nd table (tblTransaction
) which has 5 columns.
TransID, TransDate, ClientID, ProdID, Quantity
This table has all the items sold and how many of each.
The 3rd table (tblTransaction Query
) which has 4 columns
TransID, Quantity, ProdID, Price
This one was made to correlate the information in the first 2 tables so that there was a price next to the correct Product.
SELECT tblTransaction.TransID, Quantity, tblProduct.ProdID, Price
FROM tblTransaction, tblProduct
WHERE tblTransaction.ProdID = tblProduct.ProdID;
The 4th table (tblProduct Query
) which has 2 columns
ProdID, Total_Quantity
It is what I made to show the total number of each product sold. I want a 3rd column to show the total price of each item X quantity sold. So the total of all of each product ( if that makes sense).
SELECT ProdID, SUM(Quantity) AS Total_Quantity
FROM tblTransaction AS Query
GROUP BY ProdID;
I can provide the DB file and screen shots if that will help. I am new to SQL so please bear with me.
I am currently doing SQL in Microsoft Access. It says at the top Database (Access 2000 file format)