SQL vs Ecto optimization/translation help

More rather it is a non-small SQL statement and it is not formatted in proper markdown code tags so it is very hard to read. ^.^

I’ll fix your post to use proper markdown so it looks better. :slight_smile:

EDIT: And edited, I do not have time to mentally parse and convert the size of that SQL just yet, but if no one else does soonish then poke me with @OvermindDL1 and I’ll take a look when I can. :slight_smile: