create join query on the same table