How do I create an OQL query that joins two tables?

I am following this sample but when I use my own tables, my query is not working. I am trying to join two tables investment and contact status. The first query is the sample I have seen shared on forum, the second query is what I am seeking help on. Thank you!    Select SAMP.*, COM.* FROM SAMPLING$SAMPLEREQUEST SAMP,USERMANAGMENT$COMPANY COM,SAMPLING$SAMPLEREQUEST_COMPANY R1 WHERE$SAMPLEREQUESTID and  =R1.USERMANAGMENT$COMPANYID     SELECT INV.*, CON.* FROM "PUBLIC"."investment$investment" INV,"PUBLIC"."investment$contactstatus" CON, "PUBLIC"."investment$contactstatus_investment" R1 WHERE = R1."PUBLIC"."investment$investmentID" and = R1."PUBLIC"."investment$contactstatusID"
0 answers