-
Oooh... I forgot all about SELECT DISTINCT ON despite having used it once in the past.
Did you forget or hit performance issues and drop the idea? DISTINCT can put a significant load on query execution. People often end up trying to use a combination of careful database design and GROUP BY to get better speed while still eliminating or minimising duplicates. In my experience, DISTINCT is most often useful with simpler, smaller datasets.
Proof is in the testing, ofc.
Oooh... I forgot all about
SELECT DISTINCT ON
despite having used it once in the past.I think that would work.