Select SUM(CASE When CPayment='Cash' Then CAmount Else 0 End ) as CashPaymentAmount, SUM(CASE When CPayment='Check' Then CAmount Else 0 End ) as CheckPaymentAmount from TableOrderPayment Where ( CPayment='Cash' Or CPayment='Check' ) AND CDate<=SYSDATETIME() and CStatus='Active';
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter