Implementing joinable queries