A bug in the COLLECT function?
Today I received a request that had me using the COLLECTION function to aggregate values for different categories. However, it didn’t take too long to find extra rows creeping into my results. To my surprise I found using DISTINCT within a COLLECT works, unless you also try to order the results with an ORDER BY…