10 September 2016 How to ORDER BY the result of SELECT COUNT in Ecto Spoiler: by using fragments to set an alias. 2 min read Elixir, Ecto, SQL