Extreme Geek warning. I wrote this up today, so I'd have it ready in case I needed to explain some code that I just checked in, but I wanted to post it somewhere. I warn you, if you don't use MS SQL it will probably make no sense...
(
So. You want to get multiple statistics from a table, but, because of the costs associated, you don't really want to run a seperate query for each one... )