Hi Folks.
I’m struggling to get an Ecto query to work with order_by and distinct. Basically if I add the distinct option then the order_by doesn’t work.
My current solution is to remove the distinct option and pass the result through an Enum.uniq_by which does work. I’m just curious if this is something I should be doing. I know I should let the database do all the work and this might be a performance hit but I’m only talking about a couple of 100 records at max.
any thoughts?
cheers
Dave