The code for join.sql is: SELECT m.name AS member, m.member_id, c.committee_id#, #c.name AS committee FROM members AS m #INNER JOIN committees AS c ON c.name = m.name JOIN committees AS c USING(name) # INNER is not needed. ;