mysql: select join table with latest record for both table
I hope that query is selfexplanatory enough.

SELECT a.*, b.*
  FROM 
       (SELECT MAX(w.id) AS id
             , w.social_num
          FROM tableA AS w
         GROUP BY w.social_num
       ) AS maxa
  LEFT JOIN 
       (SELECT MAX(z.id) AS id
             , z.social_num
          FROM tableB AS z
         GROUP BY z.social_num
       ) AS maxb  ON maxb.social_num = maxa.social_num
  JOIN tableA       AS a  ON a.id = maxa.id
  LEFT JOIN tableB  AS b  ON b.id = maxb.id
;


The only assumption I've made is that persons from tableB are the subset of persons in the tableA and there is no persons listed in the table B and not in the tableA. Otherwise the FULL OUTER JOIN not implemented by mysql should be emulated by UNION.