Hi  I have a table where i want to create join query like (select * from patients where facility=abc) qry1 left join (select * from patients where facility=xyz) qry2 on qry1.patientid = qry2.patientid