mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
15 lines
550 B
Plaintext
15 lines
550 B
Plaintext
a DECIMAL(9, 4) DEFAULT CAST(0, \'DECIMAL(9, 4)\')
|
|
b DECIMAL(18, 4) DEFAULT CAST(a / 2, \'DECIMAL(18, 4)\')
|
|
c DECIMAL(38, 4) DEFAULT CAST(b / 3, \'DECIMAL(38, 4)\')
|
|
d Decimal(9, 4) MATERIALIZED a + toDecimal32(\'0.2\', 1)
|
|
e Decimal(18, 4) ALIAS b * 2
|
|
f Decimal(38, 4) ALIAS c * 6
|
|
0.0000 0.0000 0.0000
|
|
1.0000 0.5000 0.1666
|
|
2.0000 1.0000 0.3333
|
|
3.0000 1.5000 0.5000
|
|
0.0000 0.0000 0.0000 0.2000 0.0000 0.0000
|
|
1.0000 0.5000 0.1666 1.2000 1.0000 0.9996
|
|
2.0000 1.0000 0.3333 2.2000 2.0000 1.9998
|
|
3.0000 1.5000 0.5000 3.2000 3.0000 3.0000
|