homework-jianmu/tests/army/query/function/ans/round.csv

311 lines
8.2 KiB
Plaintext

taos> select ROUND(10.55, 3)
round(10.55, 3) |
============================
10.550000000000001 |
taos> select ROUND(10.55, 2)
round(10.55, 2) |
============================
10.550000000000001 |
taos> select ROUND(10.55, 1)
round(10.55, 1) |
============================
10.600000000000000 |
taos> select ROUND(10.55, 0)
round(10.55, 0) |
============================
11.000000000000000 |
taos> select ROUND(10.55)
round(10.55) |
============================
11.000000000000000 |
taos> select ROUND(10.55, -1)
round(10.55, -1) |
============================
10.000000000000000 |
taos> select ROUND(10.55, -10)
round(10.55, -10) |
============================
0.000000000000000 |
taos> select ROUND(-10.55, 1)
round(-10.55, 1) |
============================
-10.600000000000000 |
taos> select ROUND(99, 1)
round(99, 1) |
========================
99 |
taos> select ROUND(111.1111)
round(111.1111) |
============================
111.000000000000000 |
taos> select ROUND(111.5111)
round(111.5111) |
============================
112.000000000000000 |
taos> select ROUND(10.55) + 1
round(10.55) + 1 |
============================
12.000000000000000 |
taos> select ROUND(10.55, 1) + 1
round(10.55, 1) + 1 |
============================
11.600000000000000 |
taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123.123456789, 9), 8), 7), 6), 5), 4))
round(round(round(round(round(round(round(123.123456789, 9), 8), |
===================================================================
1.230000000000000e+02 |
taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123456789.123456789, -1), -2), -3), -4), -5), -6))
round(round(round(round(round(round(round(123456789.123456789, - |
===================================================================
1.230000000000000e+08 |
taos> select ROUND(current) from ts_4893.meters order by ts limit 20
round(current) |
=======================
11.0000000 |
9.0000000 |
10.0000000 |
11.0000000 |
11.0000000 |
9.0000000 |
10.0000000 |
11.0000000 |
11.0000000 |
10.0000000 |
11.0000000 |
9.0000000 |
11.0000000 |
8.0000000 |
12.0000000 |
9.0000000 |
10.0000000 |
10.0000000 |
10.0000000 |
10.0000000 |
taos> select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit 10
round(87654321.123456789, id) |
================================
8.765432100000000e+07 |
8.765432109999999e+07 |
8.765432112000000e+07 |
8.765432112300000e+07 |
8.765432112350000e+07 |
8.765432112345999e+07 |
8.765432112345700e+07 |
8.765432112345681e+07 |
8.765432112345679e+07 |
8.765432112345679e+07 |
taos> select ROUND(current, id) from ts_4893.meters order by ts limit 10
round(current, id) |
=======================
11.0000000 |
8.6000004 |
9.8000002 |
11.2329998 |
10.7060003 |
8.5080004 |
9.5959997 |
10.9619999 |
11.2259998 |
10.3369999 |
taos> select ROUND(current, 1) from ts_4893.meters order by ts limit 10
round(current, 1) |
=======================
10.6999998 |
8.6000004 |
9.8000002 |
11.1999998 |
10.6999998 |
8.5000000 |
9.6000004 |
11.0000000 |
11.1999998 |
10.3000002 |
taos> select round(10.55, 3)
round(10.55, 3) |
============================
10.550000000000001 |
taos> select round(10.55, 2)
round(10.55, 2) |
============================
10.550000000000001 |
taos> select round(10.55, 1)
round(10.55, 1) |
============================
10.600000000000000 |
taos> select round(10.55, 0)
round(10.55, 0) |
============================
11.000000000000000 |
taos> select round(10.55)
round(10.55) |
============================
11.000000000000000 |
taos> select round(10.55, -1)
round(10.55, -1) |
============================
10.000000000000000 |
taos> select round(10.55, -10)
round(10.55, -10) |
============================
0.000000000000000 |
taos> select round(-10.55, 1)
round(-10.55, 1) |
============================
-10.600000000000000 |
taos> select round(99, 1)
round(99, 1) |
========================
99 |
taos> select round(current) from ts_4893.d0 order by ts limit 10
round(current) |
=======================
11.0000000 |
9.0000000 |
10.0000000 |
11.0000000 |
11.0000000 |
9.0000000 |
10.0000000 |
11.0000000 |
11.0000000 |
10.0000000 |
taos> select round(current) from ts_4893.meters order by ts limit 10
round(current) |
=======================
11.0000000 |
9.0000000 |
10.0000000 |
11.0000000 |
11.0000000 |
9.0000000 |
10.0000000 |
11.0000000 |
11.0000000 |
10.0000000 |
taos> select round(10, null)
round(10, null) |
========================
NULL |
taos> select round(null, 2)
round(null, 2) |
========================
NULL |
taos> select round(123.456, null)
round(123.456, null) |
============================
NULL |
taos> select round(100)
round(100) |
========================
100 |
taos> select round(0.00123, -2)
round(0.00123, -2) |
============================
0.000000000000000 |
taos> select round(123.456, 0)
round(123.456, 0) |
============================
123.000000000000000 |
taos> select round(123.456, -5)
round(123.456, -5) |
============================
0.000000000000000 |
taos> select round(12345.6789, -2)
round(12345.6789, -2) |
============================
12300.000000000000000 |
taos> select round(-123.456, 2)
round(-123.456, 2) |
============================
-123.459999999999994 |
taos> select round(-1234.5678, 2)
round(-1234.5678, 2) |
============================
-1234.569999999999936 |
taos> select round(voltage, 0) from ts_4893.meters limit 1
round(voltage, 0) |
====================
221 |
taos> select round(current, 1) from ts_4893.meters limit 1
round(current, 1) |
=======================
10.6999998 |
taos> select round(phase, 3) from ts_4893.meters limit 1
round(phase, 3) |
=======================
0.5090000 |
taos> select round(voltage, -1) from ts_4893.meters limit 1
round(voltage, -1) |
=====================
220 |
taos> select round(current * voltage, 2) from ts_4893.meters limit 1
round(current * voltage, 2) |
==============================
2.353650000000000e+03 |
taos> select round(abs(voltage), 2) from ts_4893.meters limit 1
round(abs(voltage), 2) |
=========================
221 |
taos> select round(pi() * phase, 3) from ts_4893.meters limit 1
round(pi() * phase, 3) |
============================
1.599000000000000 |
taos> select round(sqrt(voltage), 2) from ts_4893.meters limit 1
round(sqrt(voltage), 2) |
============================
14.869999999999999 |
taos> select round(log(current), 2) from ts_4893.meters limit 1
round(log(current), 2) |
============================
2.370000000000000 |