DN
Size: a a a
DT
WITH arrayFilter((x, i, j) -> (((i.1) = 'e1') AND ((j.1) = 'e2')), arrayEnumerate(w), arrayPopBack(arrayPushFront(w, ('-', '-'))), arrayZip(x, y) AS w) AS z
SELECT arrayMap(x -> [w[x - 1], w[x]], z)
FROM
(
SELECT
['e1', 'e1', 'e1', 'e2'] AS x,
['p1', 'p1', 'p1', 'p2'] AS y
)
DT
DN
DT
SELECT group_column, arrayZip(groupArray(tpl), groupArray(cnt)) FROM(
SELECT group_column, (col1,col2,col3) as tpl, count() as cnt FROM table GROUP BY group_column, col1,col2,col3) GROUP BY group_column
C
WITH arrayFilter((x, i, j) -> (((i.1) = 'e1') AND ((j.1) = 'e2')), arrayEnumerate(w), arrayPopBack(arrayPushFront(w, ('-', '-'))), arrayZip(x, y) AS w) AS z
SELECT arrayMap(x -> [w[x - 1], w[x]], z)
FROM
(
SELECT
['e1', 'e1', 'e1', 'e2'] AS x,
['p1', 'p1', 'p1', 'p2'] AS y
)
DN
SELECT group_column, arrayZip(groupArray(tpl), groupArray(cnt)) FROM(
SELECT group_column, (col1,col2,col3) as tpl, count() as cnt FROM table GROUP BY group_column, col1,col2,col3) GROUP BY group_column
DN
YY
if(cond, then, else)
.sumIf(cond, then, else)
?sumIf(expr, cond)
.DT
if(cond, then, else)
.sumIf(cond, then, else)
?sumIf(expr, cond)
.sumIf(cond, then, else)
?YY
AG
DT
AG
AG
DT
AG
M
CREATE VIEW my_view ON CLUSTER my_cluster AS
SELECT
some_name
dictGet('dict', 'field1', tuple(some_name)) as field1, //string
dictGet('dict', 'field2', tuple(some_name)) as field2 // unit8
FROM my_table
SELECT field1, field2 FROM my_view
=> ok
SELECT field2 FROM my_view WHERE field1 = 'test_field'
=> DB :: Exception: Illegal type String of first argument of function dictGet,
expected a const string..
A