DEV Community

Yuri Pontes
Yuri Pontes

Posted on

Many people confuse rank() with dense_rank().

A technique I use to study a new clause is to "invent" translations for what the clause executes or the result it delivers.

I remember when I was studying this clause, the example in the image was the first analogy that came to mind, and I never forgot it.

When I'm having difficulty consolidating a topic, the first thing I do is write the query or syntax on a board or paper and make mind maps, "translate" the clause and fit it into a sentence to read the query.

This might be a good tip for anyone starting with SQL or any other language. It works very well for me.

RANK vs DENSE_RANK

Top comments (0)