My first time working with CASE Logic in SQL statements. Everything works if I remove the CASE statements, so the SQL is valid without it.
I need to calculate the total