The most modern way is to tokenize the database, or the two databases in case the tables belong to different databases, then you can pretrain a large language model. Fine tune it with the two tables, then apply prompt engineering to ask the ai model in natural language. No need to learn SQL!