I wrote a blog about cross-domain text-to-SQL, discussing why it is an interesting and hard problem, and one way to approach it. Here’s a quote:

[...] successful cross-database SQL semantic parsing really requires the model to reason using at least three sets of knowledge:
  • Explicit knowledge about the domain expressed in the schema;
  • Implicit background or common sense knowledge;
  • Knowledge of SQL.

Check out the full blog on Borealis AI’s site.