Add join queries to test