在clickhouse中,我如何用逗号分隔数字?
In clickhouse, how can I separate number by comma?
在clickhouse中,如何用逗号分隔数字?
select toString(toDecimal64(roundBankers( 12321.121 , 1 ), 1 ))
和returns 12,321.1 而不是 12321.1,谢谢。
未实现从数字到字符串的这种格式化。
select formatReadableQuantity(roundBankers( 12321.121 , 1 ));
┌─formatReadableQuantity(roundBankers(12321.121, 1))─┐
│ 12.32 thousand │
└────────────────────────────────────────────────────┘
SELECT concat(toString(intDiv(roundBankers(12321.121, 1) AS x, 1000)), ',', toString(x % 1000)) AS r
┌─r─────────────────────┐
│ 12,321.10000000000036 │
└───────────────────────┘
在clickhouse中,如何用逗号分隔数字?
select toString(toDecimal64(roundBankers( 12321.121 , 1 ), 1 ))
和returns 12,321.1 而不是 12321.1,谢谢。
未实现从数字到字符串的这种格式化。
select formatReadableQuantity(roundBankers( 12321.121 , 1 ));
┌─formatReadableQuantity(roundBankers(12321.121, 1))─┐
│ 12.32 thousand │
└────────────────────────────────────────────────────┘
SELECT concat(toString(intDiv(roundBankers(12321.121, 1) AS x, 1000)), ',', toString(x % 1000)) AS r
┌─r─────────────────────┐
│ 12,321.10000000000036 │
└───────────────────────┘