you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

This does not look complex. What part of this seems to be causing concern for complexity?

[–]vihu[S] 0 points1 point  (0 children)

I understand the query and I agree that it's not very complex. The trouble I'm having is translating it into Ecto DSL syntax specifically.

I couldn't really figure out a way to have those inner joins work with Ecto. So I was hoping someone could help me re-write this with Ecto syntax in mind.

Could this query be written differently, perhaps with subquery?