Handle mix of string concatenation and interpolation

in SQL queries