How to ORDER BY the result of SELECT COUNT in Ecto Spoiler: by using fragments to set an alias. Published on 10 September 2016 · Topics covered Elixir, Ecto, SQL Continue reading How to ORDER BY the result of SELECT COUNT in Ecto