Selecto, an elixir SQL query library that works with or without Ecto. Also SelectoComponents which gives you a web interface to build queries.
It is based on 20+ years of experience maintaining a similar system in Perl.
It's on Hex.pm already, looking for people to test and comment!
As Codex would say:
Selecto is an open-source SQL query builder for Elixir that helps you generate complex queries from clean, domain-based configs. It supports advanced joins, CTEs, subqueries, and analytics-friendly patterns, with companion packages for LiveView interfaces (selecto_components) and code generation (selecto_mix). If your app is data-heavy, Selecto gives you SQL-level power without brittle hand-written query strings.