Add join support to queries.