Interpolating Lists into Ecto.Query.fragment/1

This isn’t really fragment specific, this is just a matter of how IN works with Postgres parameters. You need to instead do: WHERE t.id = ANY(?)