並前往http://www.java2s.com/Tutorial/MySQL/0320__Aggregate-Functions/ASUMfunctioncanbeaddedtoCASEstatementtogiveusthetotal.htm