Hi Shruti,
The issue looks like a problem with the position of your minus character. From what limited info is visible in the log that you provided, it may be the dateAdd(month, -(24) where the minus is outside of the parentheses.
You will need to double-check your SQL.
Regards,
Craig