Skip to content
Advertisement

How do I replace dynamic values?

In my PostgreSQL database I have such table:

This is only a small fraction of the records. I’m trying to create an SQL query that would hide people’s identities. In other words, I need to get this result:

What do you recommend for this case?

Advertisement

Answer

You can use dense_rank() if you just want to hide the names:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement