Re:Distinct on: a confusing, unique and useful feature in Po...
by abalashov on Friday March 20, 2020 @07:18PM
(#22642729)
DISTINCT ON, when I stumbled upon it rather accidentally a few years ago, was a life saver in some complicated queries in some even more complicated stored functions in our telephony infrastructure product, where only the first route offered by any vendor that otherwise matches a set of criteria is desired.
The alternative would have been a lot less concise and would have required a much longer stored procedure.
The alternative would have been a lot less concise and would have required a much longer stored procedure.