I’ve got an f-string expression to build a sql select query and I’m using the following expression within the select f-string. Here my inner expression is resolved but it leaves the f”’ ” within the string and it breaks the query. Can someone please help
f”’
… left join (select a, b, sum(c)/sum(d) as c1,
… (sum(e)/sum(d))/(sum(f)/sum(d)) as c2
… from {{actual_output_tbl}}
… group by 1, 2) out
… on t1.col1= t2.col1 and t1.col2= t2.col2
… ”’ if count == 1 else “”
I’ve tried without f”’ but still breaks the nested f-string syntax
Priscilla Augustine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.