anumaurya114exp commited on
Commit
b691d62
·
verified ·
1 Parent(s): 648ac33

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -2
utils.py CHANGED
@@ -218,8 +218,10 @@ def construct_with_stats(final_query, subquery_info):
218
 
219
  with_as_statement = ",\n".join(with_as_statements)
220
 
221
-
222
- final_query_with_with_as = f"WITH {with_as_statement}\n{final_query}"
 
 
223
 
224
  return final_query_with_with_as
225
 
 
218
 
219
  with_as_statement = ",\n".join(with_as_statements)
220
 
221
+ if len(with_as_statements)>0:
222
+ final_query_with_with_as = f"WITH {with_as_statement}\n{final_query}"
223
+ else:
224
+ final_query_with_with_as = final_query
225
 
226
  return final_query_with_with_as
227