Custom SQL query: arithmetic operation fails when using parameter

There was a recent topic: