Integrated join queries into single files