in reply to Query rewriting question

All subqueries can be rewritten as a JOIN. That's part of the relational calculus. Most rewrites are very ... difficult to maintain. I'd urge their host to upgrade to 4.1.

Now, your subquery can be removed because it's a constant value. And, in fact, I would remove it and do that query separately, even with subqueries, because it would almost always be more efficient that way.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?