SELECT 'V' as Ind, Voucher_ID as 'Voucher No', Voucher_Prefix, Voucher_Type, SUM(Credit_Amount-Debit_Amount) as 'Cess Amount'  From $trans_db.Transaction_Helper where Ledger_ID='0x2x14xCess' and voucher_Date >=str_to_date('$fromDateTime','%Y-%m-%d %H:%i:%s') and voucher_Date <= str_to_date('$toDateTime','%Y-%m-%d %H:%i:%s') and Voucher_Type='SALESVOUCHER' group by Voucher_ID, Voucher_Prefix