Good day,
I have compiled the following query.
SELECT
COUNT(CASE WHEN `booking_creationdate` LIKE \'2020-01-31%\' THEN 1 END) AS 2020-01-31,
COUN
-
isn't allowed in identifiers unless the identifier is enclosed in back ticks. So instead of
... AS 2020-01-31
write
... AS `2020-01-31`
and analog for all other cases. Or use another alias without -
.
Side note: It seems like booking_creationdate
is a string. That's the wrong data type. Use some date/time data type.