Renamed statement placeholders ([relation]), fixed getShared in Join

Added square brackets around placeholders in each statement, and fixed the
function call in partial/join that was retrieving shared attributes