<p>Ideally this is only possible through solutions like SEQ2SQL(<a href="https://arxiv.org/pdf/1709.00103.pdf" rel="nofollow noreferrer">Link here for reference</a>).</p>
<p>But I implemented it in a workaround fashion:-</p>
<ol>
<li>I got the json using <code>tracker.latest_message</code> .</li>
<li>After which I processed the json to make our own structured json like:</li>
</ol>
<blockquote>
<p>[{'column_name':'a',
'operator': '=',
'value':'100'},
{'column_name':'b',
'operator': '&gt;',
'value':'100'}]</p>
</blockquote>
<ol start="3">
<li>Above structure was used to form the where clause of the query.</li>
<li>Same way I made a custom json for Select Part as well :-</li>
</ol>
<blockquote>
<p>[{sum:column1},{count:column2}]</p>
</blockquote>
<p>5.Then I looped through the json I had created and made our queries.</p>
<p>Note:- This json Structure will not be able to cover all possible scenarios but worked decently for me.</p>
How to convert user natural query into SQL query?
<p>I am trying to build a chatbot in Rasa/Dialogflow, the problem i ham facing is to convert English to SQL query so that what user write in English can be converted into SQL fetch data from MYSQL database and display result to use.</p>

<p>Can someone suggest me how to do it?</p>