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

8.2 KiB

1taos> select ROUND(10.55, 3)
2 round(10.55, 3) |
3============================
4 10.550000000000001 |
5taos> select ROUND(10.55, 2)
6 round(10.55, 2) |
7============================
8 10.550000000000001 |
9taos> select ROUND(10.55, 1)
10 round(10.55, 1) |
11============================
12 10.600000000000000 |
13taos> select ROUND(10.55, 0)
14 round(10.55, 0) |
15============================
16 11.000000000000000 |
17taos> select ROUND(10.55)
18 round(10.55) |
19============================
20 11.000000000000000 |
21taos> select ROUND(10.55, -1)
22 round(10.55, -1) |
23============================
24 10.000000000000000 |
25taos> select ROUND(10.55, -10)
26 round(10.55, -10) |
27============================
28 0.000000000000000 |
29taos> select ROUND(-10.55, 1)
30 round(-10.55, 1) |
31============================
32 -10.600000000000000 |
33taos> select ROUND(99, 1)
34 round(99, 1) |
35========================
36 99 |
37taos> select ROUND(111.1111)
38 round(111.1111) |
39============================
40 111.000000000000000 |
41taos> select ROUND(111.5111)
42 round(111.5111) |
43============================
44 112.000000000000000 |
45taos> select ROUND(10.55) + 1
46 round(10.55) + 1 |
47============================
48 12.000000000000000 |
49taos> select ROUND(10.55, 1) + 1
50 round(10.55, 1) + 1 |
51============================
52 11.600000000000000 |
53taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123.123456789, 9), 8), 7), 6), 5), 4))
54 round(round(round(round(round(round(round(123.123456789, 9), 8), |
55===================================================================
56 1.230000000000000e+02 |
57taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123456789.123456789, -1), -2), -3), -4), -5), -6))
58 round(round(round(round(round(round(round(123456789.123456789, - |
59===================================================================
60 1.230000000000000e+08 |
61taos> select ROUND(current) from ts_4893.meters order by ts limit 20
62 round(current) |
63=======================
64 11.0000000 |
65 9.0000000 |
66 10.0000000 |
67 11.0000000 |
68 11.0000000 |
69 9.0000000 |
70 10.0000000 |
71 11.0000000 |
72 11.0000000 |
73 10.0000000 |
74 11.0000000 |
75 9.0000000 |
76 11.0000000 |
77 8.0000000 |
78 12.0000000 |
79 9.0000000 |
80 10.0000000 |
81 10.0000000 |
82 10.0000000 |
83 10.0000000 |
84taos> select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit 10
85 round(87654321.123456789, id) |
86================================
87 8.765432100000000e+07 |
88 8.765432109999999e+07 |
89 8.765432112000000e+07 |
90 8.765432112300000e+07 |
91 8.765432112350000e+07 |
92 8.765432112345999e+07 |
93 8.765432112345700e+07 |
94 8.765432112345681e+07 |
95 8.765432112345679e+07 |
96 8.765432112345679e+07 |
97taos> select ROUND(current, id) from ts_4893.meters order by ts limit 10
98 round(current, id) |
99=======================
100 11.0000000 |
101 8.6000004 |
102 9.8000002 |
103 11.2329998 |
104 10.7060003 |
105 8.5080004 |
106 9.5959997 |
107 10.9619999 |
108 11.2259998 |
109 10.3369999 |
110taos> select ROUND(current, 1) from ts_4893.meters order by ts limit 10
111 round(current, 1) |
112=======================
113 10.6999998 |
114 8.6000004 |
115 9.8000002 |
116 11.1999998 |
117 10.6999998 |
118 8.5000000 |
119 9.6000004 |
120 11.0000000 |
121 11.1999998 |
122 10.3000002 |
123taos> select round(10.55, 3)
124 round(10.55, 3) |
125============================
126 10.550000000000001 |
127taos> select round(10.55, 2)
128 round(10.55, 2) |
129============================
130 10.550000000000001 |
131taos> select round(10.55, 1)
132 round(10.55, 1) |
133============================
134 10.600000000000000 |
135taos> select round(10.55, 0)
136 round(10.55, 0) |
137============================
138 11.000000000000000 |
139taos> select round(10.55)
140 round(10.55) |
141============================
142 11.000000000000000 |
143taos> select round(10.55, -1)
144 round(10.55, -1) |
145============================
146 10.000000000000000 |
147taos> select round(10.55, -10)
148 round(10.55, -10) |
149============================
150 0.000000000000000 |
151taos> select round(-10.55, 1)
152 round(-10.55, 1) |
153============================
154 -10.600000000000000 |
155taos> select round(99, 1)
156 round(99, 1) |
157========================
158 99 |
159taos> select round(current) from ts_4893.d0 order by ts limit 10
160 round(current) |
161=======================
162 11.0000000 |
163 9.0000000 |
164 10.0000000 |
165 11.0000000 |
166 11.0000000 |
167 9.0000000 |
168 10.0000000 |
169 11.0000000 |
170 11.0000000 |
171 10.0000000 |
172taos> select round(current) from ts_4893.meters order by ts limit 10
173 round(current) |
174=======================
175 11.0000000 |
176 9.0000000 |
177 10.0000000 |
178 11.0000000 |
179 11.0000000 |
180 9.0000000 |
181 10.0000000 |
182 11.0000000 |
183 11.0000000 |
184 10.0000000 |
185taos> select round(10, null)
186 round(10, null) |
187========================
188 NULL |
189taos> select round(null, 2)
190 round(null, 2) |
191========================
192 NULL |
193taos> select round(123.456, null)
194 round(123.456, null) |
195============================
196 NULL |
197taos> select round(100)
198 round(100) |
199========================
200 100 |
201taos> select round(0.00123, -2)
202 round(0.00123, -2) |
203============================
204 0.000000000000000 |
205taos> select round(123.456, 0)
206 round(123.456, 0) |
207============================
208 123.000000000000000 |
209taos> select round(123.456, -5)
210 round(123.456, -5) |
211============================
212 0.000000000000000 |
213taos> select round(12345.6789, -2)
214 round(12345.6789, -2) |
215============================
216 12300.000000000000000 |
217taos> select round(-123.456, 2)
218 round(-123.456, 2) |
219============================
220 -123.459999999999994 |
221taos> select round(-1234.5678, 2)
222 round(-1234.5678, 2) |
223============================
224 -1234.569999999999936 |
225taos> select round(voltage, 0) from ts_4893.meters limit 1
226 round(voltage, 0) |
227====================
228 221 |
229taos> select round(current, 1) from ts_4893.meters limit 1
230 round(current, 1) |
231=======================
232 10.6999998 |
233taos> select round(phase, 3) from ts_4893.meters limit 1
234 round(phase, 3) |
235=======================
236 0.5090000 |
237taos> select round(voltage, -1) from ts_4893.meters limit 1
238 round(voltage, -1) |
239=====================
240 220 |
241taos> select round(current * voltage, 2) from ts_4893.meters limit 1
242 round(current * voltage, 2) |
243==============================
244 2.353650000000000e+03 |
245taos> select round(abs(voltage), 2) from ts_4893.meters limit 1
246 round(abs(voltage), 2) |
247=========================
248 221 |
249taos> select round(pi() * phase, 3) from ts_4893.meters limit 1
250 round(pi() * phase, 3) |
251============================
252 1.599000000000000 |
253taos> select round(sqrt(voltage), 2) from ts_4893.meters limit 1
254 round(sqrt(voltage), 2) |
255============================
256 14.869999999999999 |
257taos> select round(log(current), 2) from ts_4893.meters limit 1
258 round(log(current), 2) |
259============================
260 2.370000000000000 |