Turns an SqlExpr into Sql
The resolver may hold values for placeholder tokens from SqlExpr and replace those.