SQL Master Class

There's a whole series of articles to help you use NimbleText to generate SQL.

Even a very skilled SQL Developer can't avoid repetition in their queries. SQL doesn't
have all of the sophisticated features of other languages that let you avoid repetitive
behaviour. (For example, one query can't inherit from another... wouldn't that be
fun, and terrifying.)