I need to make a query that sums a column based on a value from another table.
So I have two tables
PROJECT
PROJECT_NO PROJECT_NAME
W14026 SMSMILLHOUSE
W14026 SMSSUGARWHOUSE
W14026 SMSBOILERHOUSE
W-IGG IGGMILLHOUSE
W-IGG IGGBOILERHOUSE
DTL_ERC_UPD
PROJECT_NAME QUANTITY
SMSMILLHOUSE 5
SMSMILLHOUSE 2
SMSBOILERHOUSE 3
IGGMILLHOUSE 4
IGGMILLHOUSE 5
So i want to sum all the W14026 project that is in DTL_ERC_UPD. that should give the output of 10. I dont know how to approach that. I know simple join just doesnt work. Please help me,