Hello jodyschwartz, I think I understand your problem.
Your code isn’t working because firstly of the grave accents (`) you’re using around the values in your SUM() function (making MySQL think they are attribute or relation names). You’re also attempting to alias the value generated in the area where the value should be (not sure why?).
The SUBSTRING function does also not require the third argument, so you can safely emit that. There’s also no need to use the SUM() function - you can have expressions where values are expected. The following should therefore work:
Remember that integer values do not need quotes to encase them (you seem to be unnecessarily quoting the values for the id and tax columns).
I’d also suggest that you do not store the dollar sign with the amount in the cost attribute. It’s inconsistent with the tax and total attribute values, and more to the point, it is an output formatting detail (thus, it has no place in the database). (Had you has done this, then there would have been no need to have used MySQL’s SUBSTRING() method.) The 2 decimal place value in the 200.00 instance is also unnecessary. You can easily add formatting like that using PHP’s printf() function: