diff --git a/doc/reference_en.html b/doc/reference_en.html index 903a162ffb6..244e97dfd25 100644 --- a/doc/reference_en.html +++ b/doc/reference_en.html @@ -6434,7 +6434,7 @@ There are %%If%% and %%Array%% combinators. See the sections below. The suffix -%%If%% can be appended to the name of any aggregate function. In this case, the aggregate function accepts an extra argument - a condition (Uint8 type). The aggregate function processes only the rows that trigger the condition. If the condition was not triggered even once, it returns a default value (usually zeros or empty strings). -Examples: %%countIf(cond)%%, %%avgIf(x, cond)%%, %%quantilesTimingIf(level1, level2)(x, cond)%%, %%argMinIf(arg, val, cond)%% and so on. +Examples: %%sumIf(column, cond)%%, %%countIf(cond)%%, %%avgIf(x, cond)%%, %%quantilesTimingIf(level1, level2)(x, cond)%%, %%argMinIf(arg, val, cond)%% and so on. You can use aggregate functions to calculate aggregates for multiple conditions at once, without using subqueries and JOINs. For example, in Yandex.Metrica, we use conditional aggregate functions for implementing segment comparison functionality. diff --git a/doc/reference_ru.html b/doc/reference_ru.html index d4ea3e9eff1..ff88bc7b070 100644 --- a/doc/reference_ru.html +++ b/doc/reference_ru.html @@ -6541,7 +6541,7 @@ cond1, cond2 ... - от одного до 32 аргументов типа UInt8 К имени любой агрегатной функции может быть приписан суффикс -%%If%%. В этом случае, агрегатная функция принимает ещё один дополнительный аргумент - условие (типа UInt8). Агрегатная функция будет обрабатывать только те строки, для которых условие сработало. Если условие ни разу не сработало - возвращается некоторое значение по умолчанию (обычно - нули, пустые строки). -Примеры: %%countIf(cond)%%, %%avgIf(x, cond)%%, %%quantilesTimingIf(level1, level2)(x, cond)%%, %%argMinIf(arg, val, cond)%% и т. п. +Примеры: %%sumIf(column, cond)%%, %%countIf(cond)%%, %%avgIf(x, cond)%%, %%quantilesTimingIf(level1, level2)(x, cond)%%, %%argMinIf(arg, val, cond)%% и т. п. С помощью условных агрегатных функций, вы можете вычислить агрегаты сразу для нескольких условий, не используя подзапросы и JOIN-ы. Например, в Яндекс.Метрике, условные агрегатные функции используются для реализации функциональности сравнения сегментов.