diff --git a/text_to_sql_query.rb b/text_to_sql_query.rb index bd40ba5..ac1e085 100644 --- a/text_to_sql_query.rb +++ b/text_to_sql_query.rb @@ -74,6 +74,6 @@ class TextToSqlQuery second_operand_expression = second_operand.first second_operand_params = second_operand[1..] - ["#{first_operand_expression} #{operator.to_s} #{second_operand_expression}"] + first_operand_params + second_operand_params + ["(#{first_operand_expression} #{operator.to_s} #{second_operand_expression})"] + first_operand_params + second_operand_params end end \ No newline at end of file