It looks like MIN and MAX are not Rushmore optimizable, so this query is dragging along (1.1 million rows, indexes on all columns). Can anyone recommend any alternatives? I was thinking that I could nest something and use TOP 1 or something. Any ideas?
SELECT cPolicySymbol, cPolicyNumber , ;
MIN(tPolicyEffectiveDate) AS tPolicyEffectiveDate , ;
MAX(tPolicyExpirationDate) AS tPolicyExpirationDate ;
FROM PremPolicyXref ;
WHERE iPremApplicationID = 1 ;
GROUP BY cPolicySymbol , cPolicyNumber