SELECT p.id, p.name, GROUP_CONCAT(s.name) AS site_list FROM sites s INNER JOIN publications p ON(s.id = p.site_id) GROUP BY p.id, p.name;