You can use a component library which can help you to implement Natural language query builder in your application( *the question part* ) called [Open Natural Language Processing Package](https://opennlp.apache.org)
 ,  so you can definitely develop a module, by using existing modules of OpenNLP such as entity extraction, chunking and parsing.

According to [wikipedia source]( https://en.m.wikipedia.org/wiki/Question_answering)   ; it points out that as of 2001, *Q&A* applications typically includes a question classifier module which determines the type of question and the type of answer,so a multiagent question and answering architecture has been proposed,whereby each domain nor variable is represented by an agent which tries to answer questions,taking into account its specific knowledge.

But it still need some effort to build a [NLgenerators inline with databases](https://deepblue.lib.umich.edu/bitstream/handle/2027.42/138709/lifei_1.pdf?sequence=1&isAllowed=y ) , for the answer query and also is the link to help you on how you can work with [Compositional Semantic Parsing on Semi-Structured Tables](https://nlp.stanford.edu/software/sempre/wikitable)

Hope this can give you some insight.