mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
14 lines
369 B
MySQL
14 lines
369 B
MySQL
|
SELECT bitCount(number) FROM numbers(10);
|
||
|
SELECT avg(bitCount(number)) FROM numbers(256);
|
||
|
|
||
|
SELECT bitCount(0);
|
||
|
SELECT bitCount(1);
|
||
|
SELECT bitCount(-1);
|
||
|
|
||
|
SELECT bitCount(toInt64(-1));
|
||
|
SELECT bitCount(toInt32(-1));
|
||
|
SELECT bitCount(toInt16(-1));
|
||
|
SELECT bitCount(toInt8(-1));
|
||
|
|
||
|
SELECT x, bitCount(x), hex(reinterpretAsString(x)) FROM VALUES ('x Float64', (1), (-1), (inf));
|