Brackets with math() (BODMAS)

I’m trying to do some calculations using math() - and while it honours BODMAS I can’t seem to find any way to use brackets - e.g. do something like: ( data - 1024 ) * 1000 - if I add brackets I get an error, and if I leave them out I get: data -1024000 which is obviously not what I wnt!

Any ideas how to achieve this?

You have not said which database you are using, but this works for me on Influx
SELECT 1000*(-1024+"data")