Modify SelectQuery from c45f47336beb234b68badc14218ad0c5d24e0ec7 to use an OUTER JOIN