Clickhouse: Is there accumulate for array?

Created on 2 Jun 2019  ยท  2Comments  ยท  Source: ClickHouse/ClickHouse

data : [1, 4, 6, 8]

result : 1 * 4 * 6 * 8 = 192

question

Most helpful comment


SELECT exp2(arraySum(x -> log2(x), [1, 4, 6, 8]))

โ”Œโ”€exp2(arraySum(lambda(tuple(x), log2(x)), [1, 4, 6, 8]))โ”€โ”
โ”‚                                                     192 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

All 2 comments


SELECT exp2(arraySum(x -> log2(x), [1, 4, 6, 8]))

โ”Œโ”€exp2(arraySum(lambda(tuple(x), log2(x)), [1, 4, 6, 8]))โ”€โ”
โ”‚                                                     192 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Good idea, Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jangorecki picture jangorecki  ยท  3Comments

igor-sh8 picture igor-sh8  ยท  3Comments

zhicwu picture zhicwu  ยท  3Comments

opavader picture opavader  ยท  3Comments

derekperkins picture derekperkins  ยท  3Comments