Hello team, I have this query, but it returns me the following error, what can it be? . regards
SELECT
(
SUM(CASE WHEN ((transaction_type = "USER" or transaction_type = "APP" or transaction_type = "PHONE" or (transaction_type = "USER" and (merchant = "" or merchant = "LD"))) and type = 1 and result = "APPROVAL" and creation_date > '2017-04-12 00:00:00' and creation_date < '2017-10-12 00:00:00') THEN 1 ELSE 0 END) LD,
SUM(CASE WHEN ((transaction_type = "TOP" or transaction_type = "APP" or transaction_type = "CELL") and type = 1 and result = "APPROVAL" and creation_date > '2017-04-12 00:00:00' and creation_date < '2017-10-12 00:00:00') THEN 1 ELSE 0 END) TOPUP
)
from table
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LD,
SUM(CASE WHEN ((transaction_type = "TOPUP" or transaction_type' at line 4