Boys I have a problem that I have not been able to solve
This is my query to the bd
SELECT DATE_FORMAT( date, '%c' ) AS fecha, SUM( COALESCE( grand_total, 0 )) as total FROM sma_sales WHERE DATE_FORMAT(date, '%Y') = '2018' AND customer_id = 10 OR customer_id = 21 OR customer_id = 23 OR customer_id = 30 OR customer_id = 37 GROUP BY date_format( date, '%c' ) ORDER BY date_format( date, '%c' ) ASC
but it throws me wrong data, to make the same query with the IDs separately the amount is correct, but to take all the data together it goes crazy the amount that gives at the end
the total per user making the query one in one of the ids for November 2018 gives 19,924,349, but when making the complete query the result for November 2018 is 34.854.349
Any ideas?