writing more join queries