 <p>What you need is an inner join and a left join. Like so...</p> <pre><code>select g.name, v1.name, v1.location, coalesce(v2.name, 'NULL'), coalesce(v2.location, 'NULL') from groups g inner join venues v1 on (g.pri_venue_id = v1.venue_id) left join venues v2 on (g.alt_venue_id = v2.venue_id) </code></pre> <p>The coalesce function basically just converts <code>null</code> values into the string NULL</p>