SET @old_sql_mode = @@sql_mode;
SET @@sql_mode = '';
SELECT DATE(orderdate) as OrderDate, COUNT(orderid) as Orders, SUM(paymentamount - IFNULL(salestax1,0) - IFNULL(salestax2,0) - IFNULL(salestax3,0)) as Value1,
SUM(total_payment_received) Value2 
FROM orders
WHERE DATE(orderdate) >= DATE(NOW()) - INTERVAL 7 DAY
AND orderstatus != 'Cancelled'
GROUP BY DATE(orderdate);
SET @@sql_mode = @old_sql_mode;