ok, ill lay it out like this, and try not to be too confusing.
I need to check my trasaction table to see that the user with a UserID bought, keeping track(adding up) of how many times they bought the Product with a productID, , then i need to selcect items from product table with the productID for the items the user bought,
i know how to return the product information, and how to check the tranaction table and i think how to add up the amount of tranastions for that item
so bacially i need to select data from a product table, for the products that the user bought tahts stored in the transaction table.
well i tried not to be confusing, but i think i failed
create procedure sp_yourproc
products.ProdID, products.col1, products.col2
products inner join
transactions on products.ProdID = transaction.ProdID
transactions.UserID = @pUserID
In this stored procedure you will provide the userID as parameter and it will return columns from the products table that are bought by that user.