Arithmetic overflow error in a sql script

Job ID: 35460465

Budget: $30 – $250 USD

Hi, The SQL script I attached contains an arithmetic overflow error. I tried replacing int with bigint and decimal, but I still get an error message when running the query for a specific date (10-Nov-2022). Could you please help me run the SQL script? Thank you.