8.2 KiB
8.2 KiB
1 | taos> select ROUND(10.55, 3) |
---|---|
2 | round(10.55, 3) | |
3 | ============================ |
4 | 10.550000000000001 | |
5 | taos> select ROUND(10.55, 2) |
6 | round(10.55, 2) | |
7 | ============================ |
8 | 10.550000000000001 | |
9 | taos> select ROUND(10.55, 1) |
10 | round(10.55, 1) | |
11 | ============================ |
12 | 10.600000000000000 | |
13 | taos> select ROUND(10.55, 0) |
14 | round(10.55, 0) | |
15 | ============================ |
16 | 11.000000000000000 | |
17 | taos> select ROUND(10.55) |
18 | round(10.55) | |
19 | ============================ |
20 | 11.000000000000000 | |
21 | taos> select ROUND(10.55, -1) |
22 | round(10.55, -1) | |
23 | ============================ |
24 | 10.000000000000000 | |
25 | taos> select ROUND(10.55, -10) |
26 | round(10.55, -10) | |
27 | ============================ |
28 | 0.000000000000000 | |
29 | taos> select ROUND(-10.55, 1) |
30 | round(-10.55, 1) | |
31 | ============================ |
32 | -10.600000000000000 | |
33 | taos> select ROUND(99, 1) |
34 | round(99, 1) | |
35 | ======================== |
36 | 99 | |
37 | taos> select ROUND(111.1111) |
38 | round(111.1111) | |
39 | ============================ |
40 | 111.000000000000000 | |
41 | taos> select ROUND(111.5111) |
42 | round(111.5111) | |
43 | ============================ |
44 | 112.000000000000000 | |
45 | taos> select ROUND(10.55) + 1 |
46 | round(10.55) + 1 | |
47 | ============================ |
48 | 12.000000000000000 | |
49 | taos> select ROUND(10.55, 1) + 1 |
50 | round(10.55, 1) + 1 | |
51 | ============================ |
52 | 11.600000000000000 | |
53 | taos> 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 | |
57 | taos> 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 | |
61 | taos> 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 | |
84 | taos> 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 | |
97 | taos> 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 | |
110 | taos> 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 | |
123 | taos> select round(10.55, 3) |
124 | round(10.55, 3) | |
125 | ============================ |
126 | 10.550000000000001 | |
127 | taos> select round(10.55, 2) |
128 | round(10.55, 2) | |
129 | ============================ |
130 | 10.550000000000001 | |
131 | taos> select round(10.55, 1) |
132 | round(10.55, 1) | |
133 | ============================ |
134 | 10.600000000000000 | |
135 | taos> select round(10.55, 0) |
136 | round(10.55, 0) | |
137 | ============================ |
138 | 11.000000000000000 | |
139 | taos> select round(10.55) |
140 | round(10.55) | |
141 | ============================ |
142 | 11.000000000000000 | |
143 | taos> select round(10.55, -1) |
144 | round(10.55, -1) | |
145 | ============================ |
146 | 10.000000000000000 | |
147 | taos> select round(10.55, -10) |
148 | round(10.55, -10) | |
149 | ============================ |
150 | 0.000000000000000 | |
151 | taos> select round(-10.55, 1) |
152 | round(-10.55, 1) | |
153 | ============================ |
154 | -10.600000000000000 | |
155 | taos> select round(99, 1) |
156 | round(99, 1) | |
157 | ======================== |
158 | 99 | |
159 | taos> 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 | |
172 | taos> 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 | |
185 | taos> select round(10, null) |
186 | round(10, null) | |
187 | ======================== |
188 | NULL | |
189 | taos> select round(null, 2) |
190 | round(null, 2) | |
191 | ======================== |
192 | NULL | |
193 | taos> select round(123.456, null) |
194 | round(123.456, null) | |
195 | ============================ |
196 | NULL | |
197 | taos> select round(100) |
198 | round(100) | |
199 | ======================== |
200 | 100 | |
201 | taos> select round(0.00123, -2) |
202 | round(0.00123, -2) | |
203 | ============================ |
204 | 0.000000000000000 | |
205 | taos> select round(123.456, 0) |
206 | round(123.456, 0) | |
207 | ============================ |
208 | 123.000000000000000 | |
209 | taos> select round(123.456, -5) |
210 | round(123.456, -5) | |
211 | ============================ |
212 | 0.000000000000000 | |
213 | taos> select round(12345.6789, -2) |
214 | round(12345.6789, -2) | |
215 | ============================ |
216 | 12300.000000000000000 | |
217 | taos> select round(-123.456, 2) |
218 | round(-123.456, 2) | |
219 | ============================ |
220 | -123.459999999999994 | |
221 | taos> select round(-1234.5678, 2) |
222 | round(-1234.5678, 2) | |
223 | ============================ |
224 | -1234.569999999999936 | |
225 | taos> select round(voltage, 0) from ts_4893.meters limit 1 |
226 | round(voltage, 0) | |
227 | ==================== |
228 | 221 | |
229 | taos> select round(current, 1) from ts_4893.meters limit 1 |
230 | round(current, 1) | |
231 | ======================= |
232 | 10.6999998 | |
233 | taos> select round(phase, 3) from ts_4893.meters limit 1 |
234 | round(phase, 3) | |
235 | ======================= |
236 | 0.5090000 | |
237 | taos> select round(voltage, -1) from ts_4893.meters limit 1 |
238 | round(voltage, -1) | |
239 | ===================== |
240 | 220 | |
241 | taos> select round(current * voltage, 2) from ts_4893.meters limit 1 |
242 | round(current * voltage, 2) | |
243 | ============================== |
244 | 2.353650000000000e+03 | |
245 | taos> select round(abs(voltage), 2) from ts_4893.meters limit 1 |
246 | round(abs(voltage), 2) | |
247 | ========================= |
248 | 221 | |
249 | taos> select round(pi() * phase, 3) from ts_4893.meters limit 1 |
250 | round(pi() * phase, 3) | |
251 | ============================ |
252 | 1.599000000000000 | |
253 | taos> select round(sqrt(voltage), 2) from ts_4893.meters limit 1 |
254 | round(sqrt(voltage), 2) | |
255 | ============================ |
256 | 14.869999999999999 | |
257 | taos> select round(log(current), 2) from ts_4893.meters limit 1 |
258 | round(log(current), 2) | |
259 | ============================ |
260 | 2.370000000000000 | |