SELECT ..... where a.owner = b.owner && c.index_owner=d.owner.... //more like this