Hi,
usually the SQL statement you are looking for, is like that:
SELECT a.*, b.name, b.address
FROM tableA a, tableB b
WHERE a.ID=b.contactID AND a.data>... AND ...
This will give you all field of tableA, some field of tableB where field "ID" in tableA is equal to field "contactID" in tableB and with some condition on tableA.
I hope this help you