Add ORDER_BY to fix DISTINCT ON