Reading the Error Message Instead of Guessing
Every error on this site is a full sentence about your program, with a hint saying what to do. It's usually faster to read it than to guess.
Every error message on Coders Rock is a plain-English sentence about your specific program, with a hint underneath saying what to do about it -- never parser jargon like "expected THEN but found IDENT." That is a stated rule for this site, not a courtesy that shows up occasionally: an error that only a compiler author could parse is treated as a bug in the message, not an acceptable cost of a real error existing.
Press Run to see what your code does.
Run that with no CREATE total AS ... above it and the message says exactly what's wrong and exactly what to do: create it first, before you change it. That is a message worth reading in full, not skimming past to go straight back to guessing at the code. The habit worth building here is the same one that pays off in every other language you'll use: when something breaks, read the whole message and the hint before touching a single line, then make the one change the message is actually pointing at.
Everything above runs in this page, on your own machine. There is more of it on the practice pages.