MySQL Getting two different total amounts based on criteria

what happened when you tested it? ™

please note you may have to disable ONLY_FULL_GROUP_BY

in your query, Customer_Name is functionally dependent on Customer_Number, but Extra_Charge_Amount and Tax_Amount are not functionally dependent on either of the GROUP BY columns

so out of the box you’ll get a grouping syntax error