Ecto Many-to-Many in Select

Can you post the errors?

I think you can either use a preload in the query which will still be a join but it will collect the returned rows into some parent struct (user in your case, it seems), or use a Repo.preload which would avoid a join but rather make a second request.

How to Query a User with has_many Post in Ecto might be relevant.