I'm getting an error, and I cannot figure out why. I know the error is telling me to cast a type but I'm not sure on what?
What part of
CASE is the operator?
ERROR: operator does not exist: character varying = boolean
LINE 6: WHEN lower(foo.name) SIMILAR TO '%(foo
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
MAX(foo.total - bar.tax_amount),
WHEN lower(foo.name) SIMILAR TO '%(foo|bar|baz)%' THEN true
GROUP BY foo.name, bar.city;