Ecto - Using select_merge for flexible aggregates

Problem PostgreSQL is a rock solid database. I've been using aggregate expressions for a number of features over the past few years in various languages. They can be used to build powerful features for your platform. When teamed up with Elixir and Ecto, you get amazing flexibility in your query generation. Typically the data you want to retrieve via a select is fairly static, or there are only one…