Quote Originally Posted by dba1
You can remove table rp in the subquery. Seems to me it's not used in where clause.
You are wrong.