Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ClickHouse launches Claude-powered Agents and House Mates partner program at Open House 2026 Read more →
anyIf 组合器使用示例
If
any
anyIf
transaction_id
CREATE TABLE sales( transaction_id UInt32, amount Decimal(10,2), is_successful UInt8 ) ENGINE = MergeTree() ORDER BY tuple(); INSERT INTO sales VALUES (1, 100.00, 1), (2, 150.00, 1), (3, 155.00, 0), (4, 300.00, 1), (5, 250.50, 0), (6, 175.25, 1);
SELECT anyIf(transaction_id, amount < 200) AS tid_lt_200, anyIf(transaction_id, amount > 200) AS tid_gt_200 FROM sales;
┌─tid_lt_200─┬─tid_gt_200─┐ │ 1 │ 4 │ └────────────┴────────────┘
If 组合器
此页面对您有帮助吗?