2808 explained code solutions for 75 technologies


clickhouseSelect countIf usage example


SELECT countIf(date > '2022-01-01') FROM tblctrl + c
countIf

count row only if specified expression is true

date > '2022-01-01'

expression to check (date column has date less than 10 days ago)

tbl

table to select data from


Usage example

SELECT countIf(date > '2022-01-01') FROM tbl
output
┌─countIf(greater(date, '2022-01-01'))─┐
│                                    6 │
└──────────────────────────────────────┘