mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 13:32:13 +00:00
55 lines
2.7 KiB
MySQL
55 lines
2.7 KiB
MySQL
|
--intDiv--
|
||
|
SELECT intDiv(4,2);
|
||
|
SELECT intDiv(toDecimal32(4.4, 2), 2);
|
||
|
SELECT intDiv(4, toDecimal32(2.2, 2));
|
||
|
SELECT intDiv(toDecimal32(4.4, 2), 2);
|
||
|
SELECT intDiv(toDecimal32(4.4, 2), toDecimal32(2.2, 2));
|
||
|
SELECT intDiv(toDecimal64(4.4, 3), 2);
|
||
|
SELECT intDiv(toDecimal64(4.4, 3), toDecimal32(2.2, 2));
|
||
|
SELECT intDiv(toDecimal128(4.4, 4), 2);
|
||
|
SELECT intDiv(toDecimal128(4.4, 4), toDecimal32(2.2, 2));
|
||
|
SELECT intDiv(toDecimal256(4.4, 5), 2);
|
||
|
SELECT intDiv(toDecimal256(4.4, 5), toDecimal32(2.2, 2));
|
||
|
SELECT intDiv(4, toDecimal64(2.2, 2));
|
||
|
SELECT intDiv(toDecimal32(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDiv(4, toDecimal128(2.2, 3));
|
||
|
SELECT intDiv(toDecimal32(4.4, 2), toDecimal128(2.2, 3));
|
||
|
SELECT intDiv(4, toDecimal256(2.2, 4));
|
||
|
SELECT intDiv(toDecimal32(4.4, 2), toDecimal256(2.2, 4));
|
||
|
SELECT intDiv(toDecimal64(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDiv(toDecimal128(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDiv(toDecimal256(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDiv(toDecimal64(4.4, 2), toDecimal128(2.2, 2));
|
||
|
SELECT intDiv(toDecimal128(4.4, 2), toDecimal128(2.2, 2));
|
||
|
SELECT intDiv(toDecimal256(4.4, 2), toDecimal128(2.2, 2));
|
||
|
SELECT intDiv(toDecimal64(4.4, 2), toDecimal256(2.2, 2));
|
||
|
SELECT intDiv(toDecimal128(4.4, 2), toDecimal256(2.2, 2));
|
||
|
SELECT intDiv(toDecimal256(4.4, 2), toDecimal256(2.2, 2));
|
||
|
--intDivOrZero--
|
||
|
SELECT intDivOrZero(4,2);
|
||
|
SELECT intDivOrZero(toDecimal32(4.4, 2), 2);
|
||
|
SELECT intDivOrZero(4, toDecimal32(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal32(4.4, 2), 2);
|
||
|
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal32(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal64(4.4, 3), 2);
|
||
|
SELECT intDivOrZero(toDecimal64(4.4, 3), toDecimal32(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal128(4.4, 4), 2);
|
||
|
SELECT intDivOrZero(toDecimal128(4.4, 4), toDecimal32(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal256(4.4, 5), 2);
|
||
|
SELECT intDivOrZero(toDecimal256(4.4, 5), toDecimal32(2.2, 2));
|
||
|
SELECT intDivOrZero(4, toDecimal64(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDivOrZero(4, toDecimal128(2.2, 3));
|
||
|
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal128(2.2, 3));
|
||
|
SELECT intDivOrZero(4, toDecimal256(2.2, 4));
|
||
|
SELECT intDivOrZero(toDecimal32(4.4, 2), toDecimal256(2.2, 4));
|
||
|
SELECT intDivOrZero(toDecimal64(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal128(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal256(4.4, 2), toDecimal64(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal64(4.4, 2), toDecimal128(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal128(4.4, 2), toDecimal128(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal256(4.4, 2), toDecimal128(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal64(4.4, 2), toDecimal256(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal128(4.4, 2), toDecimal256(2.2, 2));
|
||
|
SELECT intDivOrZero(toDecimal256(4.4, 2), toDecimal256(2.2, 2));
|