In my data travels there are a couple SQL functions which have come in so singularly handily that I've decided to dedicate a blog post to them. Those functions are RANK and DENSE_RANK. In this post I'm going to talk about one particular class of use cases where these functions can come to the rescue.