@Natasha_Jay sometimes it's almost unreadable, and you wish it was totally unreadable, because there's not enough mind bleach to erase from your memory.
I remember a developer who'd built something in SQL in a single statement with six-seven levels of nesting and inner joins and god knows (I could hardly work it out and I was an ex-dev and had written that functional spec. It worked sure, but was insane, warped, and unmaintainable)
I pointed it out to the Dev Team Manager who I knew very well and it was rewritten later on ...
@Natasha_Jay I remember an example with a comment along the lines of "See if we can do this in one big SQL SELECT", as if that was an achievement to be proud of.