Rob Farley has seen some things:
I’m a consultant, so I see quite a lot of organisation’s “production code”. The quality they have in common is that it’s code that’s in production. That’s pretty much it.
I know in the days when I used to code JavaScript occasionally, there was the concept of “minifying” the code, which made a tighter version of it all, so that it would load better. This was code that was good for production. Hopefully most of the tests were happening on the minified code, because if that’s what was going into production, then you’d want to be sure that it worked, even if the pre-minification code worked fine. If you deployed code that wasn’t minified, then that wasn’t right.
But SQL doesn’t really have that concept.
Rob hits on the fundamental subjectivity of the concept and it’s worth a read.