You can remove table rp in the subquery. Seems to me it's not used in where clause.