Viewing 2 posts - 1 through 2 (of 2 total)
It was to get the latest + previous purchase per customer...about 40 million out of 60-80 million rows...twice.
Once for current and once for previous.
February 17, 2016 at 12:51 pm
#1859360
I have encountered this precise scenario a dozen times.
You can do the same thing with a correlated sub-query, and they usually scale better than any CTE because a CTE is...
February 17, 2016 at 10:35 am
#1859326