Hi
I need some help creating am SQL query
I have 3 tables
tblMaterials - MaterialID, MaterialName. MaterialType
tblProducts - ProductID, ProductName
tblProductsMaterials - ProductID, MaterialID, MaterialPercent (This one is a Many to Many table)
Now I need queries to sum data
1st query - Count Materials for each productID, Where MaterialType=1
2nd query - Sum the MaterialPercent for each productID Where MaterialType=2
Thanks
I need some help creating am SQL query
I have 3 tables
tblMaterials - MaterialID, MaterialName. MaterialType
tblProducts - ProductID, ProductName
tblProductsMaterials - ProductID, MaterialID, MaterialPercent (This one is a Many to Many table)
Now I need queries to sum data
1st query - Count Materials for each productID, Where MaterialType=1
2nd query - Sum the MaterialPercent for each productID Where MaterialType=2
Thanks