Hello. I need some help with joins and using subqueries, and will appreciate any help. To make it as simple as possible, let's say I have four tables, call them T1 (large), T2 (small), T3 (large) and T4 (small).
T1 has fields ID and ZIP.
T2 has fields ZIP.
T3 has fields ID, NAME, VAL
T4 has fields NAME.
First join is to get all T1 records where T1.ZIP and T2.ZIP match resulting in A.
Second join is to get all T3 records where T3.NAME and T4.NAME match resulting in B.
Third join is to get all B records where B.ID and A.ID match resulting in C.
Then I need to Sum C.VAL
I just can't get around syntax errors and need some help. Thanks for your time and help.
T1 has fields ID and ZIP.
T2 has fields ZIP.
T3 has fields ID, NAME, VAL
T4 has fields NAME.
First join is to get all T1 records where T1.ZIP and T2.ZIP match resulting in A.
Second join is to get all T3 records where T3.NAME and T4.NAME match resulting in B.
Third join is to get all B records where B.ID and A.ID match resulting in C.
Then I need to Sum C.VAL
I just can't get around syntax errors and need some help. Thanks for your time and help.