Factor out the sqlite GROUP_CONCAT