aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal_scalar.sql
blob: 81ce0f5dbf20d464d159dfe9765ccd5064b80763 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
USE plato;

SELECT
    cs_ext_list_price + cast("10.2" as decimal(7,2)),
    cs_ext_list_price + cast("99999.99" as decimal(7,2)),
    cs_ext_list_price - cast("11.22" as decimal(7,2)),
    cs_ext_list_price - cast("99999.99" as decimal(7,2)),
FROM Input;

SELECT
    cast("10.2" as decimal(7,2)) + cs_ext_list_price,
    cast("99999.99" as decimal(7,2)) + cs_ext_list_price,
    cast("11.22" as decimal(7,2)) - cs_ext_list_price,
    cast("99999.99" as decimal(7,2)) - cs_ext_list_price,
FROM Input;