inを許可しているのに MySQL がdate_sent_at
inの使用を許可していないことについて、何か特別な理由がありますか?WHERE
GROUP BY
SELECT
CONCAT(type, '_', IF(om.is_auto, 'auto', 'user')) AS subtype,
DATE(om.sent_at) AS date_sent_at,
COUNT(om.id) AS sends
FROM outgoing_message om INNER JOIN outgoing_message_customers AS omc
ON om.id = omc.outgoing_message_id
WHERE
omc.customer_id = 2
AND
om.status <> 'pending'
AND
date_sent_at >= '2012-01-01'
GROUP BY subtype, date_sent_at
編集:(もちろん)私はDATE(om.sent_at) >= '2012-01-01'
.