Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
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 |
-
|
|
|
|
|
|
|
| 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 |
|