diff --git a/tableqa/nlp.py b/tableqa/nlp.py index 9ef6220..687b0cc 100644 --- a/tableqa/nlp.py +++ b/tableqa/nlp.py @@ -360,14 +360,16 @@ def get_sql_query(self,df,q,distinct): if condflag: subq=subq.replace('=','') subq=subq.replace("'","") - - - - - + question+=subq #repeatedly concatenates the incoming entities in sql syntax - + + sub_clause='''GROUP BY {}''' + for i,s in enumerate(sf): + condflag=False + col = s[0] + subq1=sub_clause.format(col) + question+=subq1 return question