in reply to Combining variables to create a single virtual variable
Another perhaps even-more-obvious way to present it would be to make one or more correspondings lists of letter-tag names, then iterate through that list making interpolations to build up the SQL string. (Variable-names only, of course ... from a known fixed list, of course ...) If there is a natural symmetry that you want to emphasize to the next reader of the source code, which of course is a very desirable thing to do, then I think that this would be a “clean and obvious” way to do that.