When posting an error message it is helpful to post the entire message, they mean different things when you can see the entire message.
I can tell you why you are getting this specific error though, you can't refer to the table custRP in your group by clause since you have given your table an alias.
more importantly though, can you show some sample rows of both tables and it might clear up exactly what you are tryingto do?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.