Sorry for not explaining further. The statement actually does a Join on two tables that have 2,000,000+ rows then groups by two columns and then does a SUM and ROUND on the response from a function. The issue that I was having was that the function was returning multiple rows and therefore and...