Robuta

https://neon.com/postgresql/tutorial/distinct-on PostgreSQL DISTINCT ON In this tutorial, you will learn how to use the PostgreSQL DISTINCT ON clause to retrieve distinct rows based on a specific column. distinct onpostgresql