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 →
了解如何在 ClickHouse 中使用 -If 和 -Distinct 聚合组合器,以简化查询语法并提升分析能力。
-If
-Distinct
--标准 SQL SELECT avg(number) FILTER (WHERE number > 50) FROM numbers(100) --ClickHouse 使用聚合组合器 SELECT avgIf(number, number > 50) FROM numbers(100)
--标准 SQL SELECT avg(DISTINCT number) --ClickHouse 使用聚合组合器 SELECT avgDistinct(number)
WITH Region = 'us' AS segment1, Browser = 'Chrome' AS segment2 SELECT uniqIf(UserID, segment1), uniqIf(UserID, segment2) WHERE segment1 OR segment2
此页面对您有帮助吗?