даёт больше, чем просто count?
SELECT
toDate(created_at) AS day,
countIf(amount = 0) AS cnt
FROM events
WHERE (day = today()) AND (event_id = 7)
GROUP BY day
┌────────day─┬─────cnt─┐
│ 2019-11-27 │ 1322814 │
└────────────┴─────────┘
SELECT
toDate(created_at) AS day,
count() AS cnt
FROM events
WHERE (day = today()) AND (event_id = 7)
GROUP BY day
┌────────day─┬───cnt─┐
│ 2019-11-27 │ 81138 │
└────────────┴───────┘
а сколько возвращает count() без group by?
Обсуждают сегодня