You know THE ONE I’m talking about… it has numerous sub-queries and CTEs… JOIN after JOIN after JOIN… predicates within predicates. Or maybe it’s just an obscene MERGE statement.
These are particularly painful to deal with because it’s hard to test the pieces in isolation and ensure that an issue earlier in the process doesn’t bite you later.