test(func): delete unused files and rename

This commit is contained in:
qevolg 2024-10-21 14:09:25 +08:00
parent 80f2e3aee3
commit 7af2a8dbc3
57 changed files with 11769 additions and 16588 deletions

View File

@ -1,112 +1,302 @@
104
104 taos> select ASCII('hello')
104 ascii('hello') |
104 =================
229 104 |
105.000000000000000
103.000000000000000 taos> select ASCII('hello world')
104 ascii('hello world') |
104 =======================
104 104 |
104
104 taos> select ASCII('hello world!')
105.000000000000000 ascii('hello world!') |
2.080000000000000e+02 ========================
110 104 |
228
117 taos> select ASCII('hello,world.你好,世界。')
112 ascii('hello,world.你好,世界。') |
110 ==========================================
110 104 |
112
110 taos> select ASCII('北京涛思数据科技有限公司')
112 ascii('北京涛思数据科技有限公司') |
228 ================================================
110 229 |
228
117 taos> select ASCII('hello') + 1
112 ascii('hello') + 1 |
110 ============================
110 105.000000000000000 |
228
117 taos> select ASCII('hello') - 1
112 ascii('hello') - 1 |
110 ============================
12100.000000000000000 103.000000000000000 |
51984.000000000000000
13689.000000000000000 taos> select ASCII('hello') from ts_4893.meters limit 5
12544.000000000000000 ascii('hello') |
12100.000000000000000 =================
10.488088481701515 104 |
15.099668870541500 104 |
10.816653826391969 104 |
10.583005244258363 104 |
10.488088481701515 104 |
110
228 taos> select ASCII('hello') + 1 from ts_4893.meters limit 1
117 ascii('hello') + 1 |
112 ============================
110 105.000000000000000 |
116
116 taos> select ASCII('hello') + ASCII('hello') from ts_4893.meters limit 1
39 ascii('hello') + ascii('hello') |
108 ==================================
120 2.080000000000000e+02 |
108
120 taos> select ASCII(nch1) from ts_4893.meters order by ts limit 5
108 ascii(nch1) |
116 ==============
104 110 |
116 228 |
116 117 |
104 112 |
108 110 |
120
108 taos> select ASCII(var1) from ts_4893.meters order by ts limit 5
120 ascii(var1) |
108 ==============
116 110 |
104 112 |
116 110 |
116 112 |
104 228 |
110
228 taos> select ASCII(concat(nch1,var1)) from ts_4893.meters order by ts limit 5
117 ascii(concat(nch1,var1)) |
112 ===========================
110 110 |
110 228 |
97 117 |
228 112 |
110 110 |
97
110 taos> select ASCII(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5
228 ascii(cast(nch1 as varchar)) |
117 ===============================
112 110 |
110 228 |
110 117 |
97 112 |
228 110 |
110
97 taos> select pow(ASCII(nch1), 2) from ts_4893.meters order by ts limit 5
110 pow(ascii(nch1), 2) |
112 ============================
110 12100.000000000000000 |
112 51984.000000000000000 |
228 13689.000000000000000 |
117 12544.000000000000000 |
112 12100.000000000000000 |
112
112 taos> select sqrt(ASCII(nch1)) from ts_4893.meters order by ts limit 5
112 sqrt(ascii(nch1)) |
110 ============================
112 10.488088481701515 |
110 15.099668870541500 |
112 10.816653826391969 |
228 10.583005244258363 |
117 10.488088481701515 |
112
112 taos> select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5
112 cast(ascii(nch1) as int) |
112 ===========================
110 |
228 |
117 |
112 |
110 |
taos> select ascii('taos')
ascii('taos') |
================
116 |
taos> select ascii('t')
ascii('t') |
=============
116 |
taos> select ascii('\'')
ascii('\'') |
==============
39 |
taos> select ascii(name) from ts_4893.d0 order by ts limit 10
ascii(name) |
==============
108 |
120 |
108 |
120 |
108 |
116 |
104 |
116 |
116 |
104 |
taos> select ascii(name) from ts_4893.meters order by ts limit 10
ascii(name) |
==============
108 |
120 |
108 |
120 |
108 |
116 |
104 |
116 |
116 |
104 |
taos> select ascii(nch1) from ts_4893.d0 order by ts limit 10
ascii(nch1) |
==============
110 |
228 |
117 |
112 |
110 |
110 |
97 |
228 |
110 |
97 |
taos> select ascii(nch1) from ts_4893.meters order by ts limit 10
ascii(nch1) |
==============
110 |
228 |
117 |
112 |
110 |
110 |
97 |
228 |
110 |
97 |
taos> select ascii(var1) from ts_4893.d0 order by ts limit 10
ascii(var1) |
==============
110 |
112 |
110 |
112 |
228 |
117 |
112 |
112 |
112 |
112 |
taos> select ascii(var1) from ts_4893.meters order by ts limit 10
ascii(var1) |
==============
110 |
112 |
110 |
112 |
228 |
117 |
112 |
112 |
112 |
112 |
taos> select ascii(null)
ascii(null) |
==============
NULL |
taos> select ascii('0')
ascii('0') |
=============
48 |
taos> select ascii(' ')
ascii(' ') |
=============
32 |
taos> select ascii('~')
ascii('~') |
=============
126 |
taos> select ascii('中')
ascii('中') |
===============
228 |
taos> select ascii('é')
ascii('é') |
==============
195 |
taos> select ascii('!@#')
ascii('!@#') |
===============
33 |
taos> select ascii('Hello')
ascii('Hello') |
=================
72 |
taos> select ascii('123abc')
ascii('123abc') |
==================
49 |
taos> select ascii(concat('A', 'B'))
ascii(concat('A', 'B')) |
==========================
65 |
taos> select ascii(char(65))
ascii(char(65)) |
==================
65 |
taos> select ascii(upper('b'))
ascii(upper('b')) |
====================
66 |
taos> select ascii(trim(' A '))
ascii(trim(' A ')) |
=====================
65 |
taos> select name, ascii(name) from ts_4893.meters limit 1
name | ascii(name) |
===============================================
lili | 108 |
taos> select name, ascii(substring(name, 1, 1)) from ts_4893.meters limit 1
name | ascii(substring(name, 1, 1)) |
================================================================
lili | 108 |
taos> select nch1, ascii(nch1) from ts_4893.meters limit 1
nch1 | ascii(nch1) |
===============================================
novel | 110 |
taos> select var1, ascii(var1) from ts_4893.meters limit 1
var1 | ascii(var1) |
===============================================
novel | 110 |

Can't render this file because it has a wrong number of fields in line 17.

View File

@ -1,302 +0,0 @@
taos> select ASCII('hello')
ascii('hello') |
=================
104 |
taos> select ASCII('hello world')
ascii('hello world') |
=======================
104 |
taos> select ASCII('hello world!')
ascii('hello world!') |
========================
104 |
taos> select ASCII('hello,world.你好,世界。')
ascii('hello,world.你好,世界。') |
==========================================
104 |
taos> select ASCII('北京涛思数据科技有限公司')
ascii('北京涛思数据科技有限公司') |
================================================
229 |
taos> select ASCII('hello') + 1
ascii('hello') + 1 |
============================
105.000000000000000 |
taos> select ASCII('hello') - 1
ascii('hello') - 1 |
============================
103.000000000000000 |
taos> select ASCII('hello') from ts_4893.meters limit 5
ascii('hello') |
=================
104 |
104 |
104 |
104 |
104 |
taos> select ASCII('hello') + 1 from ts_4893.meters limit 1
ascii('hello') + 1 |
============================
105.000000000000000 |
taos> select ASCII('hello') + ASCII('hello') from ts_4893.meters limit 1
ascii('hello') + ascii('hello') |
==================================
2.080000000000000e+02 |
taos> select ASCII(nch1) from ts_4893.meters order by ts limit 5
ascii(nch1) |
==============
110 |
228 |
117 |
112 |
110 |
taos> select ASCII(var1) from ts_4893.meters order by ts limit 5
ascii(var1) |
==============
110 |
112 |
110 |
112 |
228 |
taos> select ASCII(concat(nch1,var1)) from ts_4893.meters order by ts limit 5
ascii(concat(nch1,var1)) |
===========================
110 |
228 |
117 |
112 |
110 |
taos> select ASCII(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5
ascii(cast(nch1 as varchar)) |
===============================
110 |
228 |
117 |
112 |
110 |
taos> select pow(ASCII(nch1), 2) from ts_4893.meters order by ts limit 5
pow(ascii(nch1), 2) |
============================
12100.000000000000000 |
51984.000000000000000 |
13689.000000000000000 |
12544.000000000000000 |
12100.000000000000000 |
taos> select sqrt(ASCII(nch1)) from ts_4893.meters order by ts limit 5
sqrt(ascii(nch1)) |
============================
10.488088481701515 |
15.099668870541500 |
10.816653826391969 |
10.583005244258363 |
10.488088481701515 |
taos> select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5
cast(ascii(nch1) as int) |
===========================
110 |
228 |
117 |
112 |
110 |
taos> select ascii('taos')
ascii('taos') |
================
116 |
taos> select ascii('t')
ascii('t') |
=============
116 |
taos> select ascii('\'')
ascii('\'') |
==============
39 |
taos> select ascii(name) from ts_4893.d0 order by ts limit 10
ascii(name) |
==============
108 |
120 |
108 |
120 |
108 |
116 |
104 |
116 |
116 |
104 |
taos> select ascii(name) from ts_4893.meters order by ts limit 10
ascii(name) |
==============
108 |
120 |
108 |
120 |
108 |
116 |
104 |
116 |
116 |
104 |
taos> select ascii(nch1) from ts_4893.d0 order by ts limit 10
ascii(nch1) |
==============
110 |
228 |
117 |
112 |
110 |
110 |
97 |
228 |
110 |
97 |
taos> select ascii(nch1) from ts_4893.meters order by ts limit 10
ascii(nch1) |
==============
110 |
228 |
117 |
112 |
110 |
110 |
97 |
228 |
110 |
97 |
taos> select ascii(var1) from ts_4893.d0 order by ts limit 10
ascii(var1) |
==============
110 |
112 |
110 |
112 |
228 |
117 |
112 |
112 |
112 |
112 |
taos> select ascii(var1) from ts_4893.meters order by ts limit 10
ascii(var1) |
==============
110 |
112 |
110 |
112 |
228 |
117 |
112 |
112 |
112 |
112 |
taos> select ascii(null)
ascii(null) |
==============
NULL |
taos> select ascii('0')
ascii('0') |
=============
48 |
taos> select ascii(' ')
ascii(' ') |
=============
32 |
taos> select ascii('~')
ascii('~') |
=============
126 |
taos> select ascii('中')
ascii('中') |
===============
228 |
taos> select ascii('é')
ascii('é') |
==============
195 |
taos> select ascii('!@#')
ascii('!@#') |
===============
33 |
taos> select ascii('Hello')
ascii('Hello') |
=================
72 |
taos> select ascii('123abc')
ascii('123abc') |
==================
49 |
taos> select ascii(concat('A', 'B'))
ascii(concat('A', 'B')) |
==========================
65 |
taos> select ascii(char(65))
ascii(char(65)) |
==================
65 |
taos> select ascii(upper('b'))
ascii(upper('b')) |
====================
66 |
taos> select ascii(trim(' A '))
ascii(trim(' A ')) |
=====================
65 |
taos> select name, ascii(name) from ts_4893.meters limit 1
name | ascii(name) |
===============================================
lili | 108 |
taos> select name, ascii(substring(name, 1, 1)) from ts_4893.meters limit 1
name | ascii(substring(name, 1, 1)) |
================================================================
lili | 108 |
taos> select nch1, ascii(nch1) from ts_4893.meters limit 1
nch1 | ascii(nch1) |
===============================================
novel | 110 |
taos> select var1, ascii(var1) from ts_4893.meters limit 1
var1 | ascii(var1) |
===============================================
novel | 110 |
Can't render this file because it has a wrong number of fields in line 17.

View File

@ -1,43 +1,129 @@
M
M taos> select CHAR(77)
d char(77) |
M ===========
M M |
M
M taos> select CHAR(77.5)
M char(77.5) |
MNOPQ =============
MNOPQ M |
MNOPQ
MNOPQ taos> select CHAR(100)
MNOPQ char(100) |
MM ============
MM d |
MM
MM taos> select CHAR(77) from ts_4893.meters limit 5
MM char(77) |
MN ===========
MN M |
MN M |
MN M |
MN M |
1 M |
M
N taos> select CHAR(77,78,79,80,81) from ts_4893.meters limit 5
O char(77,78,79,80,81) |
P =========================
Q MNOPQ |
MMM MNOPQ |
NNN MNOPQ |
OOO MNOPQ |
PPP MNOPQ |
QQQ
MMMMM taos> select CHAR(77*256+77) from ts_4893.meters limit 5
NNNNN char(77*256+77) |
OOOOO ==================
PPPPP MM |
QQQQQ MM |
M MM |
MM MM |
{ MM |
M{
taos> select concat(CHAR(77),CHAR(78)) from ts_4893.meters limit 5
concat(char(77),char(78)) |
============================
MN |
MN |
MN |
MN |
MN |
taos> select cast(CHAR(49) as int)
cast(char(49) as int) |
========================
1 |
taos> select CHAR(id + 77) from ts_4893.meters order by ts limit 5;
char(id + 77) |
================
M |
N |
O |
P |
Q |
taos> select CONCAT(CHAR(id + 77),CHAR(id + 77),CHAR(id + 77)) from ts_4893.meters limit 5
concat(char(id + 77),char(id + 77),char(id + 77)) |
====================================================
MMM |
NNN |
OOO |
PPP |
QQQ |
taos> select CHAR(id+77, id+77, id+77, id+77, id+77) from ts_4893.meters limit 5
char(id+77, id+77, id+77, id+77, id+77) |
==========================================
MMMMM |
NNNNN |
OOOOO |
PPPPP |
QQQQQ |
taos> select char(77)
char(77) |
===========
M |
taos> select char(77 * 256 + 77)
char(77 * 256 + 77) |
======================
MM |
taos> select char('123')
char('123') |
==============
{ |
taos> select char(77, NULL, '123')
char(77, null, '123') |
========================
M{ |
taos> select char(null)
char(null) |
=============
|
taos> select char('ustc')
char('ustc') |
===============
|
taos> select char(65.99)
char(65.99) |
==============
A |
taos> select char(65, 66, 67)
char(65, 66, 67) |
===================
ABC |
taos> select char(72, 101, 108, 108, 111)
char(72, 101, 108, 108, 111) |
===============================
Hello |

Can't render this file because it has a wrong number of fields in line 26.

View File

@ -1,129 +0,0 @@
taos> select CHAR(77)
char(77) |
===========
M |
taos> select CHAR(77.5)
char(77.5) |
=============
M |
taos> select CHAR(100)
char(100) |
============
d |
taos> select CHAR(77) from ts_4893.meters limit 5
char(77) |
===========
M |
M |
M |
M |
M |
taos> select CHAR(77,78,79,80,81) from ts_4893.meters limit 5
char(77,78,79,80,81) |
=========================
MNOPQ |
MNOPQ |
MNOPQ |
MNOPQ |
MNOPQ |
taos> select CHAR(77*256+77) from ts_4893.meters limit 5
char(77*256+77) |
==================
MM |
MM |
MM |
MM |
MM |
taos> select concat(CHAR(77),CHAR(78)) from ts_4893.meters limit 5
concat(char(77),char(78)) |
============================
MN |
MN |
MN |
MN |
MN |
taos> select cast(CHAR(49) as int)
cast(char(49) as int) |
========================
1 |
taos> select CHAR(id + 77) from ts_4893.meters order by ts limit 5;
char(id + 77) |
================
M |
N |
O |
P |
Q |
taos> select CONCAT(CHAR(id + 77),CHAR(id + 77),CHAR(id + 77)) from ts_4893.meters limit 5
concat(char(id + 77),char(id + 77),char(id + 77)) |
====================================================
MMM |
NNN |
OOO |
PPP |
QQQ |
taos> select CHAR(id+77, id+77, id+77, id+77, id+77) from ts_4893.meters limit 5
char(id+77, id+77, id+77, id+77, id+77) |
==========================================
MMMMM |
NNNNN |
OOOOO |
PPPPP |
QQQQQ |
taos> select char(77)
char(77) |
===========
M |
taos> select char(77 * 256 + 77)
char(77 * 256 + 77) |
======================
MM |
taos> select char('123')
char('123') |
==============
{ |
taos> select char(77, NULL, '123')
char(77, null, '123') |
========================
M{ |
taos> select char(null)
char(null) |
=============
|
taos> select char('ustc')
char('ustc') |
===============
|
taos> select char(65.99)
char(65.99) |
==============
A |
taos> select char(65, 66, 67)
char(65, 66, 67) |
===================
ABC |
taos> select char(72, 101, 108, 108, 111)
char(72, 101, 108, 108, 111) |
===============================
Hello |
Can't render this file because it has a wrong number of fields in line 26.

View File

@ -1,93 +1,259 @@
5
11 taos> select CHAR_LENGTH('hello')
12 char_length('hello') |
18 ========================
12 5 |
6.000000000000000
4.000000000000000 taos> select CHAR_LENGTH('hello world')
5 char_length('hello world') |
5 =============================
5 11 |
5
5 taos> select CHAR_LENGTH('hello world!')
6.000000000000000 char_length('hello world!') |
1.000000000000000e+01 ==============================
5 12 |
10
6 taos> select CHAR_LENGTH('hello,world.你好,世界。')
7 char_length('hello,world.你好,世界。') |
5 ================================================
5 18 |
6
5 taos> select CHAR_LENGTH('北京涛思数据科技有限公司')
5 char_length('北京涛思数据科技有限公司') |
10 ======================================================
10 12 |
16
11 taos> select CHAR_LENGTH('hello') + 1
12 char_length('hello') + 1 |
15 ============================
5 6.000000000000000 |
10
6 taos> select CHAR_LENGTH('hello') - 1
7 char_length('hello') - 1 |
5 ============================
25.000000000000000 4.000000000000000 |
100.000000000000000
36.000000000000000 taos> select CHAR_LENGTH('hello') from ts_4893.meters limit 5
49.000000000000000 char_length('hello') |
25.000000000000000 ========================
2.236067977499790 5 |
3.162277660168380 5 |
2.449489742783178 5 |
2.645751311064591 5 |
2.236067977499790 5 |
5
10 taos> select CHAR_LENGTH('hello') + 1 from ts_4893.meters limit 1
6 char_length('hello') + 1 |
7 ============================
5 6.000000000000000 |
4
2 taos> select CHAR_LENGTH('hello') + CHAR_LENGTH('hello') from ts_4893.meters limit 1
6 char_length('hello') + char_length('hello') |
5 ==============================================
5 1.000000000000000e+01 |
10
6 taos> select CHAR_LENGTH(nch1) from ts_4893.meters order by ts limit 5
7 char_length(nch1) |
5 ========================
5 5 |
5 10 |
10 6 |
5 7 |
5 5 |
5
10 taos> select CHAR_LENGTH(var1) from ts_4893.meters order by ts limit 5
6 char_length(var1) |
7 ========================
5 5 |
5 6 |
5 5 |
10 5 |
5 10 |
5
5 taos> select CHAR_LENGTH(concat(nch1,var1)) from ts_4893.meters order by ts limit 5
6 char_length(concat(nch1,var1)) |
5 =================================
5 10 |
10 16 |
6 11 |
7 12 |
6 15 |
7
5 taos> select CHAR_LENGTH(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5
5 char_length(cast(nch1 as varchar)) |
6 =====================================
5 5 |
5 10 |
10 6 |
6 7 |
7 5 |
6
7 taos> select pow(CHAR_LENGTH(nch1), 2) from ts_4893.meters order by ts limit 5
5 pow(char_length(nch1), 2) |
============================
25.000000000000000 |
100.000000000000000 |
36.000000000000000 |
49.000000000000000 |
25.000000000000000 |
taos> select sqrt(CHAR_LENGTH(nch1)) from ts_4893.meters order by ts limit 5
sqrt(char_length(nch1)) |
============================
2.236067977499790 |
3.162277660168380 |
2.449489742783178 |
2.645751311064591 |
2.236067977499790 |
taos> select cast(CHAR_LENGTH(nch1) as int) from ts_4893.meters order by ts limit 5
cast(char_length(nch1) as int) |
=================================
5 |
10 |
6 |
7 |
5 |
taos> select char_length('taos')
char_length('taos') |
========================
4 |
taos> select char_length('涛思')
char_length('涛思') |
========================
2 |
taos> select char_length('涛思taos')
char_length('涛思taos') |
============================
6 |
taos> select char_length('tao\'s')
char_length('tao\'s') |
========================
5 |
taos> select char_length(nch1) from ts_4893.d0 limit 10
char_length(nch1) |
========================
5 |
10 |
6 |
7 |
5 |
5 |
5 |
10 |
5 |
5 |
taos> select char_length(nch1) from ts_4893.meters limit 10
char_length(nch1) |
========================
5 |
10 |
6 |
7 |
5 |
5 |
5 |
10 |
5 |
5 |
taos> select char_length(var1) from ts_4893.d0 limit 10
char_length(var1) |
========================
5 |
6 |
5 |
5 |
10 |
6 |
7 |
6 |
7 |
5 |
taos> select char_length(var1) from ts_4893.meters limit 10
char_length(var1) |
========================
5 |
6 |
5 |
5 |
10 |
6 |
7 |
6 |
7 |
5 |
taos> select char_length(null)
char_length(null) |
========================
NULL |
taos> select char_length('')
char_length('') |
========================
0 |
taos> select char_length('あいうえお')
char_length('あいうえお') |
=================================
5 |
taos> select min(char_length(name)) from ts_4893.meters
min(char_length(name)) |
=========================
1 |
taos> select max(char_length(name)) from ts_4893.meters
max(char_length(name)) |
=========================
4 |
taos> select trim(name), char_length(trim(name)) from ts_4893.meters limit 1
trim(name) | char_length(trim(name)) |
===========================================================
lili | 4 |
taos> select upper(name), char_length(upper(name)) from ts_4893.meters limit 1
upper(name) | char_length(upper(name)) |
============================================================
LILI | 4 |
taos> select concat(name, ' - ', location), char_length(concat(name, ' - ', location)) from ts_4893.meters limit 1
concat(name, ' - ', location) | char_length(concat(name, ' - ', location)) |
==============================================================================
lili - beijing | 14 |
taos> select substring(name, 1, 5), char_length(substring(name, 1, 5)) from ts_4893.meters limit 1
substring(name, 1, 5) | char_length(substring(name, 1, 5)) |
======================================================================
lili | 4 |
taos> select name, char_length(name) from ts_4893.meters limit 1
name | char_length(name) |
=========================================================
lili | 4 |
taos> select nch1, char_length(nch1) from ts_4893.meters limit 1
nch1 | char_length(nch1) |
=========================================================
novel | 5 |
taos> select groupid, max(char_length(name)) from ts_4893.meters group by groupid order by ts
groupid | max(char_length(name)) |
===================================
1 | 4 |
taos> select location, avg(char_length(name)) from ts_4893.meters group by location order by location
location | avg(char_length(name)) |
=================================================
beijing | 3.244600000000000 |

Can't render this file because it has a wrong number of fields in line 17.

View File

@ -1,259 +0,0 @@
taos> select CHAR_LENGTH('hello')
char_length('hello') |
========================
5 |
taos> select CHAR_LENGTH('hello world')
char_length('hello world') |
=============================
11 |
taos> select CHAR_LENGTH('hello world!')
char_length('hello world!') |
==============================
12 |
taos> select CHAR_LENGTH('hello,world.你好,世界。')
char_length('hello,world.你好,世界。') |
================================================
18 |
taos> select CHAR_LENGTH('北京涛思数据科技有限公司')
char_length('北京涛思数据科技有限公司') |
======================================================
12 |
taos> select CHAR_LENGTH('hello') + 1
char_length('hello') + 1 |
============================
6.000000000000000 |
taos> select CHAR_LENGTH('hello') - 1
char_length('hello') - 1 |
============================
4.000000000000000 |
taos> select CHAR_LENGTH('hello') from ts_4893.meters limit 5
char_length('hello') |
========================
5 |
5 |
5 |
5 |
5 |
taos> select CHAR_LENGTH('hello') + 1 from ts_4893.meters limit 1
char_length('hello') + 1 |
============================
6.000000000000000 |
taos> select CHAR_LENGTH('hello') + CHAR_LENGTH('hello') from ts_4893.meters limit 1
char_length('hello') + char_length('hello') |
==============================================
1.000000000000000e+01 |
taos> select CHAR_LENGTH(nch1) from ts_4893.meters order by ts limit 5
char_length(nch1) |
========================
5 |
10 |
6 |
7 |
5 |
taos> select CHAR_LENGTH(var1) from ts_4893.meters order by ts limit 5
char_length(var1) |
========================
5 |
6 |
5 |
5 |
10 |
taos> select CHAR_LENGTH(concat(nch1,var1)) from ts_4893.meters order by ts limit 5
char_length(concat(nch1,var1)) |
=================================
10 |
16 |
11 |
12 |
15 |
taos> select CHAR_LENGTH(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5
char_length(cast(nch1 as varchar)) |
=====================================
5 |
10 |
6 |
7 |
5 |
taos> select pow(CHAR_LENGTH(nch1), 2) from ts_4893.meters order by ts limit 5
pow(char_length(nch1), 2) |
============================
25.000000000000000 |
100.000000000000000 |
36.000000000000000 |
49.000000000000000 |
25.000000000000000 |
taos> select sqrt(CHAR_LENGTH(nch1)) from ts_4893.meters order by ts limit 5
sqrt(char_length(nch1)) |
============================
2.236067977499790 |
3.162277660168380 |
2.449489742783178 |
2.645751311064591 |
2.236067977499790 |
taos> select cast(CHAR_LENGTH(nch1) as int) from ts_4893.meters order by ts limit 5
cast(char_length(nch1) as int) |
=================================
5 |
10 |
6 |
7 |
5 |
taos> select char_length('taos')
char_length('taos') |
========================
4 |
taos> select char_length('涛思')
char_length('涛思') |
========================
2 |
taos> select char_length('涛思taos')
char_length('涛思taos') |
============================
6 |
taos> select char_length('tao\'s')
char_length('tao\'s') |
========================
5 |
taos> select char_length(nch1) from ts_4893.d0 limit 10
char_length(nch1) |
========================
5 |
10 |
6 |
7 |
5 |
5 |
5 |
10 |
5 |
5 |
taos> select char_length(nch1) from ts_4893.meters limit 10
char_length(nch1) |
========================
5 |
10 |
6 |
7 |
5 |
5 |
5 |
10 |
5 |
5 |
taos> select char_length(var1) from ts_4893.d0 limit 10
char_length(var1) |
========================
5 |
6 |
5 |
5 |
10 |
6 |
7 |
6 |
7 |
5 |
taos> select char_length(var1) from ts_4893.meters limit 10
char_length(var1) |
========================
5 |
6 |
5 |
5 |
10 |
6 |
7 |
6 |
7 |
5 |
taos> select char_length(null)
char_length(null) |
========================
NULL |
taos> select char_length('')
char_length('') |
========================
0 |
taos> select char_length('あいうえお')
char_length('あいうえお') |
=================================
5 |
taos> select min(char_length(name)) from ts_4893.meters
min(char_length(name)) |
=========================
1 |
taos> select max(char_length(name)) from ts_4893.meters
max(char_length(name)) |
=========================
4 |
taos> select trim(name), char_length(trim(name)) from ts_4893.meters limit 1
trim(name) | char_length(trim(name)) |
===========================================================
lili | 4 |
taos> select upper(name), char_length(upper(name)) from ts_4893.meters limit 1
upper(name) | char_length(upper(name)) |
============================================================
LILI | 4 |
taos> select concat(name, ' - ', location), char_length(concat(name, ' - ', location)) from ts_4893.meters limit 1
concat(name, ' - ', location) | char_length(concat(name, ' - ', location)) |
==============================================================================
lili - beijing | 14 |
taos> select substring(name, 1, 5), char_length(substring(name, 1, 5)) from ts_4893.meters limit 1
substring(name, 1, 5) | char_length(substring(name, 1, 5)) |
======================================================================
lili | 4 |
taos> select name, char_length(name) from ts_4893.meters limit 1
name | char_length(name) |
=========================================================
lili | 4 |
taos> select nch1, char_length(nch1) from ts_4893.meters limit 1
nch1 | char_length(nch1) |
=========================================================
novel | 5 |
taos> select groupid, max(char_length(name)) from ts_4893.meters group by groupid order by ts
groupid | max(char_length(name)) |
===================================
1 | 4 |
taos> select location, avg(char_length(name)) from ts_4893.meters group by location order by location
location | avg(char_length(name)) |
=================================================
beijing | 3.244600000000000 |
Can't render this file because it has a wrong number of fields in line 17.

View File

@ -1,99 +1,262 @@
4
4 taos> select DAYOFWEEK('2020-01-01 00:00:00')
4 dayofweek('2020-01-01 00:00:00') |
4 ===================================
4 4 |
4
4 taos> select DAYOFWEEK('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
4 dayofweek('2020-01-01 00:00:00') |
4 ===================================
4 4 |
4 4 |
6 4 |
6 4 |
6 4 |
6 4 |
6 4 |
6 4 |
6 4 |
6 4 |
6
6 taos> select DAYOFWEEK('2021-01-01 00:00:00')
6 dayofweek('2021-01-01 00:00:00') |
5 ===================================
5 6 |
5
5 taos> select DAYOFWEEK('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
5 dayofweek('2021-01-01 00:00:00') |
5 ===================================
5 6 |
5 6 |
5 6 |
5 6 |
5 6 |
5 6 |
5 6 |
5 6 |
5 6 |
5 6 |
5
5 taos> select DAYOFWEEK('1998-01-01 00:00:00')
5 dayofweek('1998-01-01 00:00:00') |
5 ===================================
5 5 |
5
5 taos> select DAYOFWEEK('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
5 dayofweek('1998-01-01 00:00:00') |
5 ===================================
5 5 |
5 5 |
5 5 |
5 5 |
5 5 |
5 5 |
5 5 |
5 5 |
4 5 |
4 5 |
4
4 taos> select DAYOFWEEK('1998-12-31 00:00:00')
4 dayofweek('1998-12-31 00:00:00') |
4 ===================================
4 5 |
4
4 taos> select DAYOFWEEK('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
4 dayofweek('1998-12-31 00:00:00') |
4 ===================================
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
4
4 taos> select DAYOFWEEK('2000-01-06 00:00:00')
2 dayofweek('2000-01-06 00:00:00') |
6 ===================================
6 5 |
6
6 taos> select DAYOFWEEK('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
6 dayofweek('2000-01-06 00:00:00') |
6 ===================================
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6 5 |
6
6 taos> select DAYOFWEEK(1725095657)
6 dayofweek(1725095657) |
6 ========================
4 |
taos> select DAYOFWEEK(1725095657) from ts_4893.meters order by ts limit 10
dayofweek(1725095657) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select DAYOFWEEK(ts) from ts_4893.meters order by ts limit 10
dayofweek(ts) |
========================
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
taos> select dayofweek(null)
dayofweek(null) |
========================
NULL |
taos> select dayofweek('1721020591')
dayofweek('1721020591') |
==========================
NULL |
taos> select dayofweek('1721020666229')
dayofweek('1721020666229') |
=============================
NULL |
taos> select dayofweek('abc')
dayofweek('abc') |
========================
NULL |
taos> select dayofweek('01/01/2020')
dayofweek('01/01/2020') |
==========================
NULL |
taos> select dayofweek('20200101')
dayofweek('20200101') |
========================
NULL |
taos> select dayofweek('20/01/01')
dayofweek('20/01/01') |
========================
NULL |
taos> select dayofweek('11/01/31')
dayofweek('11/01/31') |
========================
NULL |
taos> select dayofweek('01-JAN-20')
dayofweek('01-JAN-20') |
=========================
NULL |
taos> select dayofweek('2020-01-01')
dayofweek('2020-01-01') |
==========================
4 |
taos> select dayofweek(1721020666)
dayofweek(1721020666) |
========================
4 |
taos> select dayofweek(1721020666229)
dayofweek(1721020666229) |
===========================
2 |
taos> select dayofweek(ts) from ts_4893.d0 order by ts limit 10
dayofweek(ts) |
========================
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
taos> select dayofweek(ts) from ts_4893.meters order by ts limit 10
dayofweek(ts) |
========================
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
taos> select dayofweek('2024-02-29')
dayofweek('2024-02-29') |
==========================
5 |
taos> select dayofweek('2024-01-01')
dayofweek('2024-01-01') |
==========================
2 |
taos> select dayofweek('2024-12-31')
dayofweek('2024-12-31') |
==========================
3 |
taos> select dayofweek('9999-12-31')
dayofweek('9999-12-31') |
==========================
6 |
taos> select dayofweek(ts) from ts_4893.meters limit 1
dayofweek(ts) |
========================
6 |
taos> select dayofweek(name) from ts_4893.meters limit 1
dayofweek(name) |
========================
NULL |
taos> select dayofweek(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
dayofweek(timediff(ts, '2024-10-10 09:36:50.172')) |
=====================================================
6 |
taos> select id, dayofweek(ts) from ts_4893.meters where id = 1 limit 1
id | dayofweek(ts) |
======================================
1 | 6 |
taos> select groupid, sum(dayofweek(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(dayofweek(ts)) |
==================================
1 | 400012 |

Can't render this file because it has a wrong number of fields in line 248.

View File

@ -1,262 +0,0 @@
taos> select DAYOFWEEK('2020-01-01 00:00:00')
dayofweek('2020-01-01 00:00:00') |
===================================
4 |
taos> select DAYOFWEEK('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
dayofweek('2020-01-01 00:00:00') |
===================================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select DAYOFWEEK('2021-01-01 00:00:00')
dayofweek('2021-01-01 00:00:00') |
===================================
6 |
taos> select DAYOFWEEK('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
dayofweek('2021-01-01 00:00:00') |
===================================
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
taos> select DAYOFWEEK('1998-01-01 00:00:00')
dayofweek('1998-01-01 00:00:00') |
===================================
5 |
taos> select DAYOFWEEK('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
dayofweek('1998-01-01 00:00:00') |
===================================
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
taos> select DAYOFWEEK('1998-12-31 00:00:00')
dayofweek('1998-12-31 00:00:00') |
===================================
5 |
taos> select DAYOFWEEK('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
dayofweek('1998-12-31 00:00:00') |
===================================
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
taos> select DAYOFWEEK('2000-01-06 00:00:00')
dayofweek('2000-01-06 00:00:00') |
===================================
5 |
taos> select DAYOFWEEK('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
dayofweek('2000-01-06 00:00:00') |
===================================
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
5 |
taos> select DAYOFWEEK(1725095657)
dayofweek(1725095657) |
========================
4 |
taos> select DAYOFWEEK(1725095657) from ts_4893.meters order by ts limit 10
dayofweek(1725095657) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select DAYOFWEEK(ts) from ts_4893.meters order by ts limit 10
dayofweek(ts) |
========================
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
taos> select dayofweek(null)
dayofweek(null) |
========================
NULL |
taos> select dayofweek('1721020591')
dayofweek('1721020591') |
==========================
NULL |
taos> select dayofweek('1721020666229')
dayofweek('1721020666229') |
=============================
NULL |
taos> select dayofweek('abc')
dayofweek('abc') |
========================
NULL |
taos> select dayofweek('01/01/2020')
dayofweek('01/01/2020') |
==========================
NULL |
taos> select dayofweek('20200101')
dayofweek('20200101') |
========================
NULL |
taos> select dayofweek('20/01/01')
dayofweek('20/01/01') |
========================
NULL |
taos> select dayofweek('11/01/31')
dayofweek('11/01/31') |
========================
NULL |
taos> select dayofweek('01-JAN-20')
dayofweek('01-JAN-20') |
=========================
NULL |
taos> select dayofweek('2020-01-01')
dayofweek('2020-01-01') |
==========================
4 |
taos> select dayofweek(1721020666)
dayofweek(1721020666) |
========================
4 |
taos> select dayofweek(1721020666229)
dayofweek(1721020666229) |
===========================
2 |
taos> select dayofweek(ts) from ts_4893.d0 order by ts limit 10
dayofweek(ts) |
========================
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
taos> select dayofweek(ts) from ts_4893.meters order by ts limit 10
dayofweek(ts) |
========================
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
taos> select dayofweek('2024-02-29')
dayofweek('2024-02-29') |
==========================
5 |
taos> select dayofweek('2024-01-01')
dayofweek('2024-01-01') |
==========================
2 |
taos> select dayofweek('2024-12-31')
dayofweek('2024-12-31') |
==========================
3 |
taos> select dayofweek('9999-12-31')
dayofweek('9999-12-31') |
==========================
6 |
taos> select dayofweek(ts) from ts_4893.meters limit 1
dayofweek(ts) |
========================
6 |
taos> select dayofweek(name) from ts_4893.meters limit 1
dayofweek(name) |
========================
NULL |
taos> select dayofweek(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
dayofweek(timediff(ts, '2024-10-10 09:36:50.172')) |
=====================================================
6 |
taos> select id, dayofweek(ts) from ts_4893.meters where id = 1 limit 1
id | dayofweek(ts) |
======================================
1 | 6 |
taos> select groupid, sum(dayofweek(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(dayofweek(ts)) |
==================================
1 | 400012 |
Can't render this file because it has a wrong number of fields in line 248.

View File

@ -1,66 +1,270 @@
0.000000000000000
57.295779513082323 taos> select DEGREES(0)
85.943669269623484 degrees(0) |
5729.577951308232514 ============================
-57.295779513082323 0.000000000000000 |
-85.943669269623484
-5729.577951308232514 taos> select DEGREES(1)
58.295779513082323 degrees(1) |
56.295779513082323 ============================
57.295779513082323 57.295779513082323 |
57.295779513082323
57.295779513082323 taos> select DEGREES(1.5)
57.295779513082323 degrees(1.5) |
57.295779513082323 ============================
57.295779513082323 85.943669269623484 |
57.295779513082323
58.295779513082323 taos> select DEGREES(100)
56.295779513082323 degrees(100) |
114.591559026164646 ============================
28.647889756541161 5729.577951308232514 |
171.887338539246969
57.295779513082323 taos> select DEGREES(-1)
6565.612700023488287 degrees(-1) |
2.000000000000000 ============================
57.295779513082323 -57.295779513082323 |
58.295779513082323
59.295779513082323 taos> select DEGREES(-1.5)
60.295779513082323 degrees(-1.5) |
61.295779513082323 ============================
0.000000000000000 -85.943669269623484 |
58.295779513082323
116.591559026164646 taos> select DEGREES(-100)
174.887338539246969 degrees(-100) |
233.183118052329291 ============================
572.957795130823229 -5729.577951308232514 |
180.000000000000000
572.957795130823229 taos> select DEGREES(1) + 1
328280.635001174407080 degrees(1) + 1 |
23.936536824085962 ============================
572 58.295779513082323 |
0.000000000000000
57.295779513082323 taos> select DEGREES(1) - 1
81.028468454139556 degrees(1) - 1 |
99.239201175922574 ============================
114.591559026164646 56.295779513082323 |
180
610.200029957721426 taos> select DEGREES(1) * 1
491.254034090376820 degrees(1) * 1 |
561.212164701962479 ============================
643.603479905018958 57.295779513082323 |
613.408634263739941
487.472513516777667 taos> select DEGREES(1) / 1
549.810284033650078 degrees(1) / 1 |
628.076328902558998 ============================
643.202411196955836 57.295779513082323 |
592.266466706882511
610.200029957721426 taos> select DEGREES(1) from ts_4893.meters limit 5
491.254034090376820 degrees(1) |
561.212164701962479 ============================
643.603479905018958 57.295779513082323 |
613.408634263739941 57.295779513082323 |
487.472513516777667 57.295779513082323 |
549.810284033650078 57.295779513082323 |
628.076328902558998 57.295779513082323 |
643.202411196955836
592.266466706882511 taos> select DEGREES(1) + 1 from ts_4893.meters limit 1
degrees(1) + 1 |
============================
58.295779513082323 |
taos> select DEGREES(1) - 1 from ts_4893.meters limit 1
degrees(1) - 1 |
============================
56.295779513082323 |
taos> select DEGREES(1) * 2 from ts_4893.meters limit 1
degrees(1) * 2 |
============================
114.591559026164646 |
taos> select DEGREES(1) / 2 from ts_4893.meters limit 1
degrees(1) / 2 |
============================
28.647889756541161 |
taos> select DEGREES(2) + DEGREES(1) from ts_4893.meters limit 1
degrees(2) + degrees(1) |
============================
171.887338539246969 |
taos> select DEGREES(2) - DEGREES(1) from ts_4893.meters limit 1
degrees(2) - degrees(1) |
============================
57.295779513082323 |
taos> select DEGREES(2) * DEGREES(1) from ts_4893.meters limit 1
degrees(2) * degrees(1) |
============================
6565.612700023488287 |
taos> select DEGREES(2) / DEGREES(1) from ts_4893.meters limit 1
degrees(2) / degrees(1) |
============================
2.000000000000000 |
taos> select DEGREES(1) + id from ts_4893.meters order by ts limit 5
degrees(1) + id |
============================
57.295779513082323 |
58.295779513082323 |
59.295779513082323 |
60.295779513082323 |
61.295779513082323 |
taos> select DEGREES(id) + id from ts_4893.meters order by ts limit 5
degrees(id) + id |
============================
0.000000000000000 |
58.295779513082323 |
116.591559026164646 |
174.887338539246969 |
233.183118052329291 |
taos> select DEGREES(abs(10))
degrees(abs(10)) |
============================
572.957795130823229 |
taos> select DEGREES(PI())
degrees(pi()) |
============================
180.000000000000000 |
taos> select abs(DEGREES(10))
abs(degrees(10)) |
============================
572.957795130823229 |
taos> select pow(DEGREES(10), 2)
pow(degrees(10), 2) |
============================
328280.635001174407080 |
taos> select sqrt(DEGREES(10))
sqrt(degrees(10)) |
============================
23.936536824085962 |
taos> select cast(DEGREES(10) as int)
cast(degrees(10) as int) |
===========================
572 |
taos> select DEGREES(sqrt(id)) from ts_4893.meters order by ts limit 5
degrees(sqrt(id)) |
============================
0.000000000000000 |
57.295779513082323 |
81.028468454139556 |
99.239201175922574 |
114.591559026164646 |
taos> select degrees(pi())
degrees(pi()) |
============================
180.000000000000000 |
taos> select degrees(current) from ts_4893.d0 order by ts limit 10
degrees(current) |
============================
610.200029957721426 |
491.254034090376820 |
561.212164701962479 |
643.603479905018958 |
613.408634263739941 |
487.472513516777667 |
549.810284033650078 |
628.076328902558998 |
643.202411196955836 |
592.266466706882511 |
taos> select degrees(current) from ts_4893.meters order by ts limit 10
degrees(current) |
============================
610.200029957721426 |
491.254034090376820 |
561.212164701962479 |
643.603479905018958 |
613.408634263739941 |
487.472513516777667 |
549.810284033650078 |
628.076328902558998 |
643.202411196955836 |
592.266466706882511 |
taos> select degrees(null)
degrees(null) |
============================
NULL |
taos> select degrees(-5)
degrees(-5) |
============================
-286.478897565411614 |
taos> select degrees(3.14)
degrees(3.14) |
============================
179.908747671078515 |
taos> select degrees(2*pi())
degrees(2*pi()) |
============================
360.000000000000000 |
taos> select degrees(pi()/2)
degrees(pi()/2) |
============================
90.000000000000000 |
taos> select degrees(-pi()/2)
degrees(-pi()/2) |
============================
-90.000000000000000 |
taos> select degrees(1000000)
degrees(1000000) |
============================
57295779.513082325458527 |
taos> select degrees(sin(1))
degrees(sin(1)) |
============================
48.212736012209490 |
taos> select degrees(cos(1))
degrees(cos(1)) |
============================
30.957041787430903 |
taos> select degrees(tan(1))
degrees(tan(1)) |
============================
89.232889603798512 |
taos> select degrees(radians(90))
degrees(radians(90)) |
============================
90.000000000000000 |
taos> select degrees(atan(1))
degrees(atan(1)) |
============================
45.000000000000000 |
taos> select degrees(phase) from ts_4893.meters limit 1
degrees(phase) |
============================
29.157708736569255 |
taos> select degrees(current) from ts_4893.meters limit 1
degrees(current) |
============================
610.200029957721426 |
taos> select degrees(voltage) from ts_4893.meters limit 1
degrees(voltage) |
============================
12662.367272391193183 |

Can't render this file because it has a wrong number of fields in line 139.

View File

@ -1,270 +0,0 @@
taos> select DEGREES(0)
degrees(0) |
============================
0.000000000000000 |
taos> select DEGREES(1)
degrees(1) |
============================
57.295779513082323 |
taos> select DEGREES(1.5)
degrees(1.5) |
============================
85.943669269623484 |
taos> select DEGREES(100)
degrees(100) |
============================
5729.577951308232514 |
taos> select DEGREES(-1)
degrees(-1) |
============================
-57.295779513082323 |
taos> select DEGREES(-1.5)
degrees(-1.5) |
============================
-85.943669269623484 |
taos> select DEGREES(-100)
degrees(-100) |
============================
-5729.577951308232514 |
taos> select DEGREES(1) + 1
degrees(1) + 1 |
============================
58.295779513082323 |
taos> select DEGREES(1) - 1
degrees(1) - 1 |
============================
56.295779513082323 |
taos> select DEGREES(1) * 1
degrees(1) * 1 |
============================
57.295779513082323 |
taos> select DEGREES(1) / 1
degrees(1) / 1 |
============================
57.295779513082323 |
taos> select DEGREES(1) from ts_4893.meters limit 5
degrees(1) |
============================
57.295779513082323 |
57.295779513082323 |
57.295779513082323 |
57.295779513082323 |
57.295779513082323 |
taos> select DEGREES(1) + 1 from ts_4893.meters limit 1
degrees(1) + 1 |
============================
58.295779513082323 |
taos> select DEGREES(1) - 1 from ts_4893.meters limit 1
degrees(1) - 1 |
============================
56.295779513082323 |
taos> select DEGREES(1) * 2 from ts_4893.meters limit 1
degrees(1) * 2 |
============================
114.591559026164646 |
taos> select DEGREES(1) / 2 from ts_4893.meters limit 1
degrees(1) / 2 |
============================
28.647889756541161 |
taos> select DEGREES(2) + DEGREES(1) from ts_4893.meters limit 1
degrees(2) + degrees(1) |
============================
171.887338539246969 |
taos> select DEGREES(2) - DEGREES(1) from ts_4893.meters limit 1
degrees(2) - degrees(1) |
============================
57.295779513082323 |
taos> select DEGREES(2) * DEGREES(1) from ts_4893.meters limit 1
degrees(2) * degrees(1) |
============================
6565.612700023488287 |
taos> select DEGREES(2) / DEGREES(1) from ts_4893.meters limit 1
degrees(2) / degrees(1) |
============================
2.000000000000000 |
taos> select DEGREES(1) + id from ts_4893.meters order by ts limit 5
degrees(1) + id |
============================
57.295779513082323 |
58.295779513082323 |
59.295779513082323 |
60.295779513082323 |
61.295779513082323 |
taos> select DEGREES(id) + id from ts_4893.meters order by ts limit 5
degrees(id) + id |
============================
0.000000000000000 |
58.295779513082323 |
116.591559026164646 |
174.887338539246969 |
233.183118052329291 |
taos> select DEGREES(abs(10))
degrees(abs(10)) |
============================
572.957795130823229 |
taos> select DEGREES(PI())
degrees(pi()) |
============================
180.000000000000000 |
taos> select abs(DEGREES(10))
abs(degrees(10)) |
============================
572.957795130823229 |
taos> select pow(DEGREES(10), 2)
pow(degrees(10), 2) |
============================
328280.635001174407080 |
taos> select sqrt(DEGREES(10))
sqrt(degrees(10)) |
============================
23.936536824085962 |
taos> select cast(DEGREES(10) as int)
cast(degrees(10) as int) |
===========================
572 |
taos> select DEGREES(sqrt(id)) from ts_4893.meters order by ts limit 5
degrees(sqrt(id)) |
============================
0.000000000000000 |
57.295779513082323 |
81.028468454139556 |
99.239201175922574 |
114.591559026164646 |
taos> select degrees(pi())
degrees(pi()) |
============================
180.000000000000000 |
taos> select degrees(current) from ts_4893.d0 order by ts limit 10
degrees(current) |
============================
610.200029957721426 |
491.254034090376820 |
561.212164701962479 |
643.603479905018958 |
613.408634263739941 |
487.472513516777667 |
549.810284033650078 |
628.076328902558998 |
643.202411196955836 |
592.266466706882511 |
taos> select degrees(current) from ts_4893.meters order by ts limit 10
degrees(current) |
============================
610.200029957721426 |
491.254034090376820 |
561.212164701962479 |
643.603479905018958 |
613.408634263739941 |
487.472513516777667 |
549.810284033650078 |
628.076328902558998 |
643.202411196955836 |
592.266466706882511 |
taos> select degrees(null)
degrees(null) |
============================
NULL |
taos> select degrees(-5)
degrees(-5) |
============================
-286.478897565411614 |
taos> select degrees(3.14)
degrees(3.14) |
============================
179.908747671078515 |
taos> select degrees(2*pi())
degrees(2*pi()) |
============================
360.000000000000000 |
taos> select degrees(pi()/2)
degrees(pi()/2) |
============================
90.000000000000000 |
taos> select degrees(-pi()/2)
degrees(-pi()/2) |
============================
-90.000000000000000 |
taos> select degrees(1000000)
degrees(1000000) |
============================
57295779.513082325458527 |
taos> select degrees(sin(1))
degrees(sin(1)) |
============================
48.212736012209490 |
taos> select degrees(cos(1))
degrees(cos(1)) |
============================
30.957041787430903 |
taos> select degrees(tan(1))
degrees(tan(1)) |
============================
89.232889603798512 |
taos> select degrees(radians(90))
degrees(radians(90)) |
============================
90.000000000000000 |
taos> select degrees(atan(1))
degrees(atan(1)) |
============================
45.000000000000000 |
taos> select degrees(phase) from ts_4893.meters limit 1
degrees(phase) |
============================
29.157708736569255 |
taos> select degrees(current) from ts_4893.meters limit 1
degrees(current) |
============================
610.200029957721426 |
taos> select degrees(voltage) from ts_4893.meters limit 1
degrees(voltage) |
============================
12662.367272391193183 |
Can't render this file because it has a wrong number of fields in line 139.

326
tests/army/query/function/ans/exp.csv Executable file → Normal file
View File

@ -1,66 +1,260 @@
1.000000000000000
2.718281828459045 taos> select EXP(0)
4.481689070338065 exp(0) |
2.688117141816136e+43 ============================
0.367879441171442 1.000000000000000 |
0.223130160148430
0.000000000000000 taos> select EXP(1)
3.718281828459045 exp(1) |
1.718281828459045 ============================
2.718281828459045 2.718281828459045 |
2.718281828459045
2.718281828459045 taos> select EXP(1.5)
2.718281828459045 exp(1.5) |
2.718281828459045 ============================
2.718281828459045 4.481689070338065 |
2.718281828459045
3.718281828459045 taos> select EXP(100)
1.718281828459045 exp(100) |
5.436563656918090 ============================
1.359140914229523 2.688117141816136e+43 |
10.107337927389695
4.670774270471606 taos> select EXP(-1)
20.085536923187668 exp(-1) |
2.718281828459046 ============================
2.718281828459045 0.367879441171442 |
3.718281828459045
4.718281828459045 taos> select EXP(-1.5)
5.718281828459045 exp(-1.5) |
6.718281828459045 ============================
1.000000000000000 0.223130160148430 |
3.718281828459045
9.389056098930650 taos> select EXP(-100)
23.085536923187668 exp(-100) |
58.598150033144236 ============================
22026.465794806717895 0.000000000000000 |
485165195.409790337085724
148.413159102576600 taos> select EXP(1) + 1
22026 exp(1) + 1 |
1.000000000000000 ============================
2.718281828459045 3.718281828459045 |
4.113250378782928
5.652233674034091 taos> select EXP(1) - 1
7.389056098930650 exp(1) - 1 |
3814279.104760214220732 ============================
7.38905609893065 1.718281828459045 |
1.6487212707001282
42192.578453635847836 taos> select EXP(1) * 1
5292.258432380726845 exp(1) * 1 |
17943.802618770550907 ============================
75583.992598717435612 2.718281828459045 |
44622.804904812772293
4954.246535954979663 taos> select EXP(1) / 1
14705.836248958077704 exp(1) / 1 |
57641.604897186582093 ============================
75056.754435561466380 2.718281828459045 |
30853.327779395312973
42192.578453635847836 taos> select exp(1) from ts_4893.meters limit 5
5292.258432380726845 exp(1) |
17943.802618770550907 ============================
75583.992598717435612 2.718281828459045 |
44622.804904812772293 2.718281828459045 |
4954.246535954979663 2.718281828459045 |
14705.836248958077704 2.718281828459045 |
57641.604897186582093 2.718281828459045 |
75056.754435561466380
30853.327779395312973 taos> select exp(1) + 1 from ts_4893.meters limit 1
exp(1) + 1 |
============================
3.718281828459045 |
taos> select exp(1) - 1 from ts_4893.meters limit 1
exp(1) - 1 |
============================
1.718281828459045 |
taos> select exp(1) * 2 from ts_4893.meters limit 1
exp(1) * 2 |
============================
5.436563656918090 |
taos> select exp(1) / 2 from ts_4893.meters limit 1
exp(1) / 2 |
============================
1.359140914229523 |
taos> select exp(2) + exp(1) from ts_4893.meters limit 1
exp(2) + exp(1) |
============================
10.107337927389695 |
taos> select exp(2) - exp(1) from ts_4893.meters limit 1
exp(2) - exp(1) |
============================
4.670774270471606 |
taos> select exp(2) * exp(1) from ts_4893.meters limit 1
exp(2) * exp(1) |
============================
20.085536923187668 |
taos> select exp(2) / exp(1) from ts_4893.meters limit 1
exp(2) / exp(1) |
============================
2.718281828459046 |
taos> select exp(1) + id from ts_4893.meters order by ts limit 5
exp(1) + id |
============================
2.718281828459045 |
3.718281828459045 |
4.718281828459045 |
5.718281828459045 |
6.718281828459045 |
taos> select exp(id) + id from ts_4893.meters order by ts limit 5
exp(id) + id |
============================
1.000000000000000 |
3.718281828459045 |
9.389056098930650 |
23.085536923187668 |
58.598150033144236 |
taos> select abs(EXP(10))
abs(exp(10)) |
============================
22026.465794806717895 |
taos> select pow(EXP(10), 2)
pow(exp(10), 2) |
============================
485165195.409790337085724 |
taos> select sqrt(EXP(10))
sqrt(exp(10)) |
============================
148.413159102576600 |
taos> select cast(EXP(10) as int)
cast(exp(10) as int) |
=======================
22026 |
taos> select EXP(sqrt(id)) from ts_4893.meters order by ts limit 5
exp(sqrt(id)) |
============================
1.000000000000000 |
2.718281828459045 |
4.113250378782928 |
5.652233674034091 |
7.389056098930650 |
taos> select EXP(EXP(EXP(EXP(0))))
exp(exp(exp(exp(0)))) |
============================
3814279.104760214220732 |
taos> select exp(2)
exp(2) |
============================
7.389056098930650 |
taos> select exp(0.5)
exp(0.5) |
============================
1.648721270700128 |
taos> select exp(current) from ts_4893.d0 order by ts limit 10
exp(current) |
============================
42192.578453635847836 |
5292.258432380726845 |
17943.802618770550907 |
75583.992598717435612 |
44622.804904812772293 |
4954.246535954979663 |
14705.836248958077704 |
57641.604897186582093 |
75056.754435561466380 |
30853.327779395312973 |
taos> select exp(current) from ts_4893.meters order by ts limit 10
exp(current) |
============================
42192.578453635847836 |
5292.258432380726845 |
17943.802618770550907 |
75583.992598717435612 |
44622.804904812772293 |
4954.246535954979663 |
14705.836248958077704 |
57641.604897186582093 |
75056.754435561466380 |
30853.327779395312973 |
taos> select exp(null)
exp(null) |
============================
NULL |
taos> select exp(100000)
exp(100000) |
============================
NULL |
taos> select exp(-1000)
exp(-1000) |
============================
0.000000000000000 |
taos> select exp(-9999999999)
exp(-9999999999) |
============================
0.000000000000000 |
taos> select exp(0.0001)
exp(0.0001) |
============================
1.000100005000167 |
taos> select exp(pi())
exp(pi()) |
============================
23.140692632779267 |
taos> select exp(voltage) from ts_4893.meters limit 1
exp(voltage) |
============================
9.529727902367202e+95 |
taos> select exp(current) from ts_4893.meters limit 1
exp(current) |
============================
42192.578453635847836 |
taos> select exp(phase) from ts_4893.meters limit 1
exp(phase) |
============================
1.663457087766762 |
taos> select exp(voltage + current) from ts_4893.meters limit 1
exp(voltage + current) |
============================
4.020837921624308e+100 |
taos> select exp(abs(current)) from ts_4893.meters limit 1
exp(abs(current)) |
============================
42192.578453635847836 |
taos> select exp(log(voltage)) from ts_4893.meters limit 1
exp(log(voltage)) |
============================
220.999999999999915 |
taos> select round(exp(voltage), 2) from ts_4893.meters limit 1
round(exp(voltage), 2) |
============================
9.529727902367202e+95 |

Can't render this file because it has a wrong number of fields in line 129.

View File

@ -1,260 +0,0 @@
taos> select EXP(0)
exp(0) |
============================
1.000000000000000 |
taos> select EXP(1)
exp(1) |
============================
2.718281828459045 |
taos> select EXP(1.5)
exp(1.5) |
============================
4.481689070338065 |
taos> select EXP(100)
exp(100) |
============================
2.688117141816136e+43 |
taos> select EXP(-1)
exp(-1) |
============================
0.367879441171442 |
taos> select EXP(-1.5)
exp(-1.5) |
============================
0.223130160148430 |
taos> select EXP(-100)
exp(-100) |
============================
0.000000000000000 |
taos> select EXP(1) + 1
exp(1) + 1 |
============================
3.718281828459045 |
taos> select EXP(1) - 1
exp(1) - 1 |
============================
1.718281828459045 |
taos> select EXP(1) * 1
exp(1) * 1 |
============================
2.718281828459045 |
taos> select EXP(1) / 1
exp(1) / 1 |
============================
2.718281828459045 |
taos> select exp(1) from ts_4893.meters limit 5
exp(1) |
============================
2.718281828459045 |
2.718281828459045 |
2.718281828459045 |
2.718281828459045 |
2.718281828459045 |
taos> select exp(1) + 1 from ts_4893.meters limit 1
exp(1) + 1 |
============================
3.718281828459045 |
taos> select exp(1) - 1 from ts_4893.meters limit 1
exp(1) - 1 |
============================
1.718281828459045 |
taos> select exp(1) * 2 from ts_4893.meters limit 1
exp(1) * 2 |
============================
5.436563656918090 |
taos> select exp(1) / 2 from ts_4893.meters limit 1
exp(1) / 2 |
============================
1.359140914229523 |
taos> select exp(2) + exp(1) from ts_4893.meters limit 1
exp(2) + exp(1) |
============================
10.107337927389695 |
taos> select exp(2) - exp(1) from ts_4893.meters limit 1
exp(2) - exp(1) |
============================
4.670774270471606 |
taos> select exp(2) * exp(1) from ts_4893.meters limit 1
exp(2) * exp(1) |
============================
20.085536923187668 |
taos> select exp(2) / exp(1) from ts_4893.meters limit 1
exp(2) / exp(1) |
============================
2.718281828459046 |
taos> select exp(1) + id from ts_4893.meters order by ts limit 5
exp(1) + id |
============================
2.718281828459045 |
3.718281828459045 |
4.718281828459045 |
5.718281828459045 |
6.718281828459045 |
taos> select exp(id) + id from ts_4893.meters order by ts limit 5
exp(id) + id |
============================
1.000000000000000 |
3.718281828459045 |
9.389056098930650 |
23.085536923187668 |
58.598150033144236 |
taos> select abs(EXP(10))
abs(exp(10)) |
============================
22026.465794806717895 |
taos> select pow(EXP(10), 2)
pow(exp(10), 2) |
============================
485165195.409790337085724 |
taos> select sqrt(EXP(10))
sqrt(exp(10)) |
============================
148.413159102576600 |
taos> select cast(EXP(10) as int)
cast(exp(10) as int) |
=======================
22026 |
taos> select EXP(sqrt(id)) from ts_4893.meters order by ts limit 5
exp(sqrt(id)) |
============================
1.000000000000000 |
2.718281828459045 |
4.113250378782928 |
5.652233674034091 |
7.389056098930650 |
taos> select EXP(EXP(EXP(EXP(0))))
exp(exp(exp(exp(0)))) |
============================
3814279.104760214220732 |
taos> select exp(2)
exp(2) |
============================
7.389056098930650 |
taos> select exp(0.5)
exp(0.5) |
============================
1.648721270700128 |
taos> select exp(current) from ts_4893.d0 order by ts limit 10
exp(current) |
============================
42192.578453635847836 |
5292.258432380726845 |
17943.802618770550907 |
75583.992598717435612 |
44622.804904812772293 |
4954.246535954979663 |
14705.836248958077704 |
57641.604897186582093 |
75056.754435561466380 |
30853.327779395312973 |
taos> select exp(current) from ts_4893.meters order by ts limit 10
exp(current) |
============================
42192.578453635847836 |
5292.258432380726845 |
17943.802618770550907 |
75583.992598717435612 |
44622.804904812772293 |
4954.246535954979663 |
14705.836248958077704 |
57641.604897186582093 |
75056.754435561466380 |
30853.327779395312973 |
taos> select exp(null)
exp(null) |
============================
NULL |
taos> select exp(100000)
exp(100000) |
============================
NULL |
taos> select exp(-1000)
exp(-1000) |
============================
0.000000000000000 |
taos> select exp(-9999999999)
exp(-9999999999) |
============================
0.000000000000000 |
taos> select exp(0.0001)
exp(0.0001) |
============================
1.000100005000167 |
taos> select exp(pi())
exp(pi()) |
============================
23.140692632779267 |
taos> select exp(voltage) from ts_4893.meters limit 1
exp(voltage) |
============================
9.529727902367202e+95 |
taos> select exp(current) from ts_4893.meters limit 1
exp(current) |
============================
42192.578453635847836 |
taos> select exp(phase) from ts_4893.meters limit 1
exp(phase) |
============================
1.663457087766762 |
taos> select exp(voltage + current) from ts_4893.meters limit 1
exp(voltage + current) |
============================
4.020837921624308e+100 |
taos> select exp(abs(current)) from ts_4893.meters limit 1
exp(abs(current)) |
============================
42192.578453635847836 |
taos> select exp(log(voltage)) from ts_4893.meters limit 1
exp(log(voltage)) |
============================
220.999999999999915 |
taos> select round(exp(voltage), 2) from ts_4893.meters limit 1
round(exp(voltage), 2) |
============================
9.529727902367202e+95 |
Can't render this file because it has a wrong number of fields in line 129.

328
tests/army/query/function/ans/ln.csv Executable file → Normal file
View File

@ -1,63 +1,265 @@
4.605170185988092
0.405465108108164 taos> select LN(100)
4.605170185988092 ln(100) |
5.605170185988092 ============================
3.605170185988092 4.605170185988092 |
4.605170185988092
4.605170185988092 taos> select LN(1.5)
4.605170185988092 ln(1.5) |
4.605170185988092 ============================
4.605170185988092 0.405465108108164 |
4.605170185988092
4.605170185988092 taos> select LN(100)
5.605170185988092 ln(100) |
3.605170185988092 ============================
9.210340371976184 4.605170185988092 |
2.302585092994046
5.298317366548037 taos> select LN(100) + 1
-3.912023005428146 ln(100) + 1 |
3.192060730416365 ============================
0.150514997831991 5.605170185988092 |
4.605170185988092
5.605170185988092 taos> select LN(100) - 1
6.605170185988092 ln(100) - 1 |
7.605170185988092 ============================
8.605170185988092 3.605170185988092 |
0.000000000000000
1.693147180559945 taos> select LN(100) * 1
3.098612288668110 ln(100) * 1 |
4.386294361119891 ============================
5.609437912434101 4.605170185988092 |
2.302585092994046
5.301898110478399 taos> select LN(100) / 1
1.517427129385146 ln(100) / 1 |
2 ============================
0.000000000000000 4.605170185988092 |
0.693147180559945
0.881373587019543 taos> select LN(100) from ts_4893.meters limit 5
1.005052538742381 ln(100) |
1.098612288668110 ============================
-0.226079864157595 4.605170185988092 |
2.000000000000000 4.605170185988092 |
2.302585092994046 4.605170185988092 |
1.144729885849400 4.605170185988092 |
2.365559856336680 4.605170185988092 |
2.148734409997751
2.281872059185575 taos> select LN(100) + 1 from ts_4893.meters limit 1
2.418855857000369 ln(100) + 1 |
2.370804362614190 ============================
2.141006941277850 5.605170185988092 |
2.261346315560232
2.394434736880126 taos> select LN(100) - 1 from ts_4893.meters limit 1
2.418232501568406 ln(100) - 1 |
2.335729681253415 ============================
2.365559856336680 3.605170185988092 |
2.148734409997751
2.281872059185575 taos> select LN(100) * 2 from ts_4893.meters limit 1
2.418855857000369 ln(100) * 2 |
2.370804362614190 ============================
2.141006941277850 9.210340371976184 |
2.261346315560232
2.394434736880126 taos> select LN(100) / 2 from ts_4893.meters limit 1
2.418232501568406 ln(100) / 2 |
2.335729681253415 ============================
2.302585092994046 |
taos> select LN(2) + LN(100) from ts_4893.meters limit 1
ln(2) + ln(100) |
============================
5.298317366548037 |
taos> select LN(2) - LN(100) from ts_4893.meters limit 1
ln(2) - ln(100) |
============================
-3.912023005428146 |
taos> select LN(2) * LN(100) from ts_4893.meters limit 1
ln(2) * ln(100) |
============================
3.192060730416365 |
taos> select LN(2) / LN(100) from ts_4893.meters limit 1
ln(2) / ln(100) |
============================
0.150514997831991 |
taos> select LN(100) + id from ts_4893.meters order by ts limit 5
ln(100) + id |
============================
4.605170185988092 |
5.605170185988092 |
6.605170185988092 |
7.605170185988092 |
8.605170185988092 |
taos> select LN(id + 1) + id from ts_4893.meters order by ts limit 5
ln(id + 1) + id |
============================
0.000000000000000 |
1.693147180559945 |
3.098612288668110 |
4.386294361119891 |
5.609437912434101 |
taos> select ln(null)
ln(null) |
============================
NULL |
taos> select ln(0)
ln(0) |
============================
NULL |
taos> select ln(-5)
ln(-5) |
============================
NULL |
taos> select abs(LN(10))
abs(ln(10)) |
============================
2.302585092994046 |
taos> select pow(LN(10), 2)
pow(ln(10), 2) |
============================
5.301898110478399 |
taos> select sqrt(LN(10))
sqrt(ln(10)) |
============================
1.517427129385146 |
taos> select cast(LN(10) as int)
cast(ln(10) as int) |
======================
2 |
taos> select LN(sqrt(id) + 1) from ts_4893.meters order by ts limit 5
ln(sqrt(id) + 1) |
============================
0.000000000000000 |
0.693147180559945 |
0.881373587019543 |
1.005052538742381 |
1.098612288668110 |
taos> select LN(LN(LN(LN(10000))))
ln(ln(ln(ln(10000)))) |
============================
-0.226079864157595 |
taos> select LN(EXP(2))
ln(exp(2)) |
============================
2.000000000000000 |
taos> select ln(10)
ln(10) |
============================
2.302585092994046 |
taos> select ln(pi())
ln(pi()) |
============================
1.144729885849400 |
taos> select ln(current) from ts_4893.d0 order by ts limit 10
ln(current) |
============================
2.365559856336680 |
2.148734409997751 |
2.281872059185575 |
2.418855857000369 |
2.370804362614190 |
2.141006941277850 |
2.261346315560232 |
2.394434736880126 |
2.418232501568406 |
2.335729681253415 |
taos> select ln(current) from ts_4893.meters order by ts limit 10
ln(current) |
============================
2.365559856336680 |
2.148734409997751 |
2.281872059185575 |
2.418855857000369 |
2.370804362614190 |
2.141006941277850 |
2.261346315560232 |
2.394434736880126 |
2.418232501568406 |
2.335729681253415 |
taos> select ln(1)
ln(1) |
============================
0.000000000000000 |
taos> select ln(20)
ln(20) |
============================
2.995732273553991 |
taos> select ln(100)
ln(100) |
============================
4.605170185988092 |
taos> select ln(99999999999999)
ln(99999999999999) |
============================
32.236191301916627 |
taos> select ln(0.1)
ln(0.1) |
============================
-2.302585092994045 |
taos> select ln(2.718)
ln(2.718) |
============================
0.999896315728952 |
taos> select ln(exp(1))
ln(exp(1)) |
============================
1.000000000000000 |
taos> select ln(voltage) from ts_4893.meters where voltage > 0 limit 1
ln(voltage) |
============================
5.398162701517752 |
taos> select ln(current) from ts_4893.meters where current > 0 limit 1
ln(current) |
============================
2.365559856336680 |
taos> select ln(phase) from ts_4893.meters where phase > 0 limit 1
ln(phase) |
============================
-0.675507636551043 |
taos> select ln(exp(voltage)) from ts_4893.meters where voltage > 0 limit 1
ln(exp(voltage)) |
============================
221.000000000000000 |
taos> select ln(abs(current)) from ts_4893.meters where current != 0 limit 1
ln(abs(current)) |
============================
2.365559856336680 |
taos> select ln(sqrt(phase)) from ts_4893.meters where phase >= 0 limit 1
ln(sqrt(phase)) |
============================
-0.337753818275521 |
taos> select ln(log(current)) from ts_4893.meters where current > 1 limit 1
ln(log(current)) |
============================
0.861014719652538 |

Can't render this file because it has a wrong number of fields in line 124.

View File

@ -1,265 +0,0 @@
taos> select LN(100)
ln(100) |
============================
4.605170185988092 |
taos> select LN(1.5)
ln(1.5) |
============================
0.405465108108164 |
taos> select LN(100)
ln(100) |
============================
4.605170185988092 |
taos> select LN(100) + 1
ln(100) + 1 |
============================
5.605170185988092 |
taos> select LN(100) - 1
ln(100) - 1 |
============================
3.605170185988092 |
taos> select LN(100) * 1
ln(100) * 1 |
============================
4.605170185988092 |
taos> select LN(100) / 1
ln(100) / 1 |
============================
4.605170185988092 |
taos> select LN(100) from ts_4893.meters limit 5
ln(100) |
============================
4.605170185988092 |
4.605170185988092 |
4.605170185988092 |
4.605170185988092 |
4.605170185988092 |
taos> select LN(100) + 1 from ts_4893.meters limit 1
ln(100) + 1 |
============================
5.605170185988092 |
taos> select LN(100) - 1 from ts_4893.meters limit 1
ln(100) - 1 |
============================
3.605170185988092 |
taos> select LN(100) * 2 from ts_4893.meters limit 1
ln(100) * 2 |
============================
9.210340371976184 |
taos> select LN(100) / 2 from ts_4893.meters limit 1
ln(100) / 2 |
============================
2.302585092994046 |
taos> select LN(2) + LN(100) from ts_4893.meters limit 1
ln(2) + ln(100) |
============================
5.298317366548037 |
taos> select LN(2) - LN(100) from ts_4893.meters limit 1
ln(2) - ln(100) |
============================
-3.912023005428146 |
taos> select LN(2) * LN(100) from ts_4893.meters limit 1
ln(2) * ln(100) |
============================
3.192060730416365 |
taos> select LN(2) / LN(100) from ts_4893.meters limit 1
ln(2) / ln(100) |
============================
0.150514997831991 |
taos> select LN(100) + id from ts_4893.meters order by ts limit 5
ln(100) + id |
============================
4.605170185988092 |
5.605170185988092 |
6.605170185988092 |
7.605170185988092 |
8.605170185988092 |
taos> select LN(id + 1) + id from ts_4893.meters order by ts limit 5
ln(id + 1) + id |
============================
0.000000000000000 |
1.693147180559945 |
3.098612288668110 |
4.386294361119891 |
5.609437912434101 |
taos> select ln(null)
ln(null) |
============================
NULL |
taos> select ln(0)
ln(0) |
============================
NULL |
taos> select ln(-5)
ln(-5) |
============================
NULL |
taos> select abs(LN(10))
abs(ln(10)) |
============================
2.302585092994046 |
taos> select pow(LN(10), 2)
pow(ln(10), 2) |
============================
5.301898110478399 |
taos> select sqrt(LN(10))
sqrt(ln(10)) |
============================
1.517427129385146 |
taos> select cast(LN(10) as int)
cast(ln(10) as int) |
======================
2 |
taos> select LN(sqrt(id) + 1) from ts_4893.meters order by ts limit 5
ln(sqrt(id) + 1) |
============================
0.000000000000000 |
0.693147180559945 |
0.881373587019543 |
1.005052538742381 |
1.098612288668110 |
taos> select LN(LN(LN(LN(10000))))
ln(ln(ln(ln(10000)))) |
============================
-0.226079864157595 |
taos> select LN(EXP(2))
ln(exp(2)) |
============================
2.000000000000000 |
taos> select ln(10)
ln(10) |
============================
2.302585092994046 |
taos> select ln(pi())
ln(pi()) |
============================
1.144729885849400 |
taos> select ln(current) from ts_4893.d0 order by ts limit 10
ln(current) |
============================
2.365559856336680 |
2.148734409997751 |
2.281872059185575 |
2.418855857000369 |
2.370804362614190 |
2.141006941277850 |
2.261346315560232 |
2.394434736880126 |
2.418232501568406 |
2.335729681253415 |
taos> select ln(current) from ts_4893.meters order by ts limit 10
ln(current) |
============================
2.365559856336680 |
2.148734409997751 |
2.281872059185575 |
2.418855857000369 |
2.370804362614190 |
2.141006941277850 |
2.261346315560232 |
2.394434736880126 |
2.418232501568406 |
2.335729681253415 |
taos> select ln(1)
ln(1) |
============================
0.000000000000000 |
taos> select ln(20)
ln(20) |
============================
2.995732273553991 |
taos> select ln(100)
ln(100) |
============================
4.605170185988092 |
taos> select ln(99999999999999)
ln(99999999999999) |
============================
32.236191301916627 |
taos> select ln(0.1)
ln(0.1) |
============================
-2.302585092994045 |
taos> select ln(2.718)
ln(2.718) |
============================
0.999896315728952 |
taos> select ln(exp(1))
ln(exp(1)) |
============================
1.000000000000000 |
taos> select ln(voltage) from ts_4893.meters where voltage > 0 limit 1
ln(voltage) |
============================
5.398162701517752 |
taos> select ln(current) from ts_4893.meters where current > 0 limit 1
ln(current) |
============================
2.365559856336680 |
taos> select ln(phase) from ts_4893.meters where phase > 0 limit 1
ln(phase) |
============================
-0.675507636551043 |
taos> select ln(exp(voltage)) from ts_4893.meters where voltage > 0 limit 1
ln(exp(voltage)) |
============================
221.000000000000000 |
taos> select ln(abs(current)) from ts_4893.meters where current != 0 limit 1
ln(abs(current)) |
============================
2.365559856336680 |
taos> select ln(sqrt(phase)) from ts_4893.meters where phase >= 0 limit 1
ln(sqrt(phase)) |
============================
-0.337753818275521 |
taos> select ln(log(current)) from ts_4893.meters where current > 1 limit 1
ln(log(current)) |
============================
0.861014719652538 |
Can't render this file because it has a wrong number of fields in line 124.

File diff suppressed because it is too large Load Diff

View File

@ -1,605 +0,0 @@
taos> select MAX(current) from ts_4893.meters
max(current) |
=======================
11.9989996 |
taos> select MAX(voltage) from ts_4893.meters
max(voltage) |
===============
224 |
taos> select MAX(name) from ts_4893.meters
max(name) |
=================================
x |
taos> select MAX(nch1) from ts_4893.meters
max(nch1) |
=================================
一二三四五六七八九十 |
taos> select MAX(nch2) from ts_4893.meters
max(nch2) |
=================================
四 |
taos> select MAX(var1) from ts_4893.meters
max(var1) |
=================================
一二三四五六七八九十 |
taos> select MAX(var2) from ts_4893.meters
max(var2) |
=================================
四 |
taos> select MAX(id) from ts_4893.meters interval(60d)
max(id) |
==============
1110 |
2838 |
4566 |
6294 |
8022 |
9750 |
9999 |
3206 |
4934 |
6662 |
8390 |
9999 |
1846 |
3574 |
5302 |
7030 |
8758 |
9999 |
2214 |
3942 |
5670 |
7398 |
9126 |
9999 |
2582 |
4310 |
6038 |
7766 |
9494 |
9999 |
2950 |
4678 |
6406 |
8134 |
9862 |
9999 |
3318 |
5046 |
6774 |
8502 |
9999 |
1958 |
3686 |
5414 |
7142 |
8870 |
9999 |
2326 |
4054 |
5782 |
7510 |
9238 |
9999 |
2694 |
4422 |
6150 |
7878 |
9606 |
9999 |
taos> select MAX(current) from ts_4893.meters interval(60d)
max(current) |
=======================
11.9989996 |
11.9969997 |
11.9969997 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9980001 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9980001 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9980001 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9980001 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9980001 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9980001 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9969997 |
11.9989996 |
11.9989996 |
11.9989996 |
11.9860001 |
taos> select MAX(voltage) from ts_4893.meters interval(60d)
max(voltage) |
===============
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
224 |
taos> select MAX(name) from ts_4893.meters interval(60d)
max(name) |
=================================
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
taos> select MAX(nch1) from ts_4893.meters interval(60d)
max(nch1) |
=================================
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
taos> select MAX(nch2) from ts_4893.meters interval(60d)
max(nch2) |
=================================
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
taos> select MAX(var1) from ts_4893.meters interval(60d)
max(var1) |
=================================
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
一二三四五六七八九十 |
taos> select MAX(var2) from ts_4893.meters interval(60d)
max(var2) |
=================================
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
四 |
taos> select max(null) from ts_4893.meters
max(null) |
========================
NULL |
taos> select max(id) from ts_4893.meters
max(id) |
==============
9999 |
taos> select max(id) from ts_4893.meters where id > 0
max(id) |
==============
9999 |
taos> select max(id) from ts_4893.meters where id <= 0
max(id) |
==============
0 |
taos> select max(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
max(phase) |
=======================
0.9999660 |
taos> select max(voltage) from ts_4893.meters where voltage is not null
max(voltage) |
===============
224 |
taos> select max(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
max(total_voltage) |
========================
21948660 |
taos> select round(max(current), 2) from ts_4893.meters
round(max(current), 2) |
=========================
1.2000000e+01 |
taos> select pow(max(current), 2) from ts_4893.meters
pow(max(current), 2) |
============================
143.975991296219036 |
taos> select log(max(voltage) + 1) from ts_4893.meters
log(max(voltage) + 1) |
============================
5.416100402204420 |
taos> select groupid, max(voltage) from ts_4893.meters group by groupid order by groupid
groupid | max(voltage) |
=========================
1 | 224 |
taos> select location, max(id) from ts_4893.meters group by location order by location
location | max(id) |
===================================
beijing | 9999 |
taos> select location, max(current) from ts_4893.meters group by location order by location
location | max(current) |
============================================
beijing | 11.9989996 |
Can't render this file because it has a wrong number of fields in line 576.

File diff suppressed because it is too large Load Diff

View File

@ -1,605 +0,0 @@
taos> select MIN(id) from ts_4893.meters
min(id) |
==============
0 |
taos> select MIN(current) from ts_4893.meters
min(current) |
=======================
8.0000000 |
taos> select MIN(voltage) from ts_4893.meters
min(voltage) |
===============
215 |
taos> select MIN(name) from ts_4893.meters
min(name) |
=================================
haha |
taos> select MIN(nch1) from ts_4893.meters
min(nch1) |
=================================
abc一二三abc一二三abc |
taos> select MIN(nch2) from ts_4893.meters
min(nch2) |
=================================
a |
taos> select MIN(var1) from ts_4893.meters
min(var1) |
=================================
abc一二三abc一二三abc |
taos> select MIN(var2) from ts_4893.meters
min(var2) |
=================================
a |
taos> select MIN(id) from ts_4893.meters interval(60d)
min(id) |
==============
0 |
1111 |
2839 |
4567 |
6295 |
8023 |
0 |
1479 |
3207 |
4935 |
6663 |
0 |
119 |
1847 |
3575 |
5303 |
7031 |
0 |
487 |
2215 |
3943 |
5671 |
7399 |
0 |
855 |
2583 |
4311 |
6039 |
7767 |
0 |
1223 |
2951 |
4679 |
6407 |
8135 |
0 |
1591 |
3319 |
5047 |
6775 |
0 |
231 |
1959 |
3687 |
5415 |
7143 |
0 |
599 |
2327 |
4055 |
5783 |
7511 |
0 |
967 |
2695 |
4423 |
6151 |
7879 |
9607 |
taos> select MIN(current) from ts_4893.meters interval(60d)
min(current) |
=======================
8.0000000 |
8.0000000 |
8.0000000 |
8.0010004 |
8.0010004 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0030003 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0030003 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0010004 |
8.0089998 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0030003 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0019999 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0000000 |
8.0019999 |
8.0010004 |
8.0000000 |
8.0050001 |
taos> select MIN(voltage) from ts_4893.meters interval(60d)
min(voltage) |
===============
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
215 |
taos> select MIN(name) from ts_4893.meters interval(60d)
min(name) |
=================================
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
haha |
taos> select MIN(nch1) from ts_4893.meters interval(60d)
min(nch1) |
=================================
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
taos> select MIN(nch2) from ts_4893.meters interval(60d)
min(nch2) |
=================================
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
taos> select MIN(var1) from ts_4893.meters interval(60d)
min(var1) |
=================================
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
abc一二三abc一二三abc |
taos> select MIN(var2) from ts_4893.meters interval(60d)
min(var2) |
=================================
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
a |
taos> select min(null) from ts_4893.meters
min(null) |
========================
NULL |
taos> select min(id) from ts_4893.meters where id > 0
min(id) |
==============
1 |
taos> select min(id) from ts_4893.meters where id <= 0
min(id) |
==============
0 |
taos> select min(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
min(phase) |
=======================
0.0001700 |
taos> select min(voltage) from ts_4893.meters where voltage is not null
min(voltage) |
===============
215 |
taos> select min(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
min(total_voltage) |
========================
21948660 |
taos> select round(min(current), 2) from ts_4893.meters
round(min(current), 2) |
=========================
8.0000000e+00 |
taos> select pow(min(current), 2) from ts_4893.meters
pow(min(current), 2) |
============================
64.000000000000000 |
taos> select log(min(voltage) + 1) from ts_4893.meters
log(min(voltage) + 1) |
============================
5.375278407684165 |
taos> select groupid, min(voltage) from ts_4893.meters group by groupid order by groupid
groupid | min(voltage) |
=========================
1 | 215 |
taos> select location, min(current) from ts_4893.meters group by location order by location
location | min(current) |
============================================
beijing | 8.0000000 |
taos> select location, min(id) from ts_4893.meters group by location order by location
location | min(id) |
===================================
beijing | 0 |
Can't render this file because it has a wrong number of fields in line 576.

View File

@ -1,72 +1,235 @@
1.550000000000001
0.550000000000001 taos> select MOD(10.55, 3)
0.550000000000001 mod(10.55, 3) |
0.550000000000001 ============================
0.550000000000001 1.550000000000001 |
-0.550000000000001
0.000000000000000 taos> select MOD(10.55, 2)
1.550000000000001 mod(10.55, 2) |
1.234567890000022e-01 ============================
1.234567910432816e-01 0.550000000000001 |
1.234567910432816e-01
1.123456791043282e+00 taos> select MOD(10.55, 1)
1.234567910432816e-01 mod(10.55, 1) |
1.123456791043282e+00 ============================
1.123456791043282e+00 0.550000000000001 |
3.123456791043282e+00
6.123456791043282e+00 taos> select MOD(10.55, -1)
1.123456791043282e+00 mod(10.55, -1) |
1.234567910432816e-01 ============================
1.123456791043282e+00 0.550000000000001 |
0.649999618530273
0.574000358581543 taos> select MOD(10.55, -10)
0.795000076293945 mod(10.55, -10) |
3.232999801635742 ============================
0.706000328063965 0.550000000000001 |
2.508000373840332
2.595999717712402 taos> select MOD(-10.55, 1)
2.961999893188477 mod(-10.55, 1) |
2.225999832153320 ============================
0.336999893188477 -0.550000000000001 |
0.649999618530273
0.574000358581543 taos> select MOD(99, 1)
0.795000076293945 mod(99, 1) |
0.232999801635742 ============================
0.706000328063965 0.000000000000000 |
0.508000373840332
0.595999717712402 taos> select MOD(10.55, 1) + 1
0.961999893188477 mod(10.55, 1) + 1 |
0.225999832153320 ============================
0.336999893188477 1.550000000000001 |
2.634337159700784e-01
9.281394021770111e-01 taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123.123456789, 9), 8), 7), 6), 5), 4), 3)
1.296964830944782e-01 mod(mod(mod(mod(mod(mod(mod(123.123456789, 9), 8), 7), 6), 5), 4 |
3.351566768190027e+00 ===================================================================
3.272002495118848e+00 1.234567890000022e-01 |
2.916847677517688e+00
3.097741066924800e+00 taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
3.310891102586806e+00 mod(mod(mod(mod(mod(mod(mod(123456789.123456789, -1), -2), -3), |
3.350522322288470e+00 ===================================================================
3.215120509901375e+00 1.234567910432816e-01 |
1
1 taos> select MOD(87654321.123456789, id + 1) from ts_4893.meters order by ts limit 10
0 mod(87654321.123456789, id + 1) |
1 ==================================
2 1.234567910432816e-01 |
0 1.123456791043282e+00 |
1 1.234567910432816e-01 |
2 1.123456791043282e+00 |
0 1.123456791043282e+00 |
1 3.123456791043282e+00 |
2 6.123456791043282e+00 |
0 1.123456791043282e+00 |
0 1.234567910432816e-01 |
1 1.123456791043282e+00 |
2
0 taos> select MOD(current, id + 1) from ts_4893.meters order by ts limit 10
1 mod(current, id + 1) |
2 ============================
0 0.649999618530273 |
1 0.574000358581543 |
2 0.795000076293945 |
0 3.232999801635742 |
0.706000328063965 |
2.508000373840332 |
2.595999717712402 |
2.961999893188477 |
2.225999832153320 |
0.336999893188477 |
taos> select MOD(current, 1) from ts_4893.meters order by ts limit 10
mod(current, 1) |
============================
0.649999618530273 |
0.574000358581543 |
0.795000076293945 |
0.232999801635742 |
0.706000328063965 |
0.508000373840332 |
0.595999717712402 |
0.961999893188477 |
0.225999832153320 |
0.336999893188477 |
taos> select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10
mod(sqrt(current), abs(id + 1)) |
==================================
2.634337159700784e-01 |
9.281394021770111e-01 |
1.296964830944782e-01 |
3.351566768190027e+00 |
3.272002495118848e+00 |
2.916847677517688e+00 |
3.097741066924800e+00 |
3.310891102586806e+00 |
3.350522322288470e+00 |
3.215120509901375e+00 |
taos> select mod(10, -3)
mod(10, -3) |
============================
1.000000000000000 |
taos> select mod(10, 3)
mod(10, 3) |
============================
1.000000000000000 |
taos> select mod(id, 3) from ts_4893.d0 order by ts limit 10
mod(id, 3) |
============================
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
taos> select mod(id, 3) from ts_4893.meters order by ts limit 10
mod(id, 3) |
============================
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
taos> select mod(null, 2)
mod(null, 2) |
============================
NULL |
taos> select mod(10, null)
mod(10, null) |
============================
NULL |
taos> select mod(10, 0)
mod(10, 0) |
============================
NULL |
taos> select mod(-10, 0)
mod(-10, 0) |
============================
NULL |
taos> select mod(5, 0)
mod(5, 0) |
============================
NULL |
taos> select mod(0, 1)
mod(0, 1) |
============================
0.000000000000000 |
taos> select mod(1, 1)
mod(1, 1) |
============================
0.000000000000000 |
taos> select mod(5, 2)
mod(5, 2) |
============================
1.000000000000000 |
taos> select mod(5, -3)
mod(5, -3) |
============================
2.000000000000000 |
taos> select mod(15, 4)
mod(15, 4) |
============================
3.000000000000000 |
taos> select mod(-5, 3)
mod(-5, 3) |
============================
-2.000000000000000 |
taos> select mod(voltage, 2) from ts_4893.meters limit 1
mod(voltage, 2) |
============================
1.000000000000000 |
taos> select mod(current, 10) from ts_4893.meters limit 1
mod(current, 10) |
============================
0.649999618530273 |
taos> select mod(current, log(100)) from ts_4893.meters limit 1
mod(current, log(100)) |
============================
1.439659246554090 |
taos> select mod(phase, 4) from ts_4893.meters limit 1
mod(phase, 4) |
============================
0.508898019790649 |
taos> select mod(abs(voltage), 3) from ts_4893.meters limit 1
mod(abs(voltage), 3) |
============================
2.000000000000000 |
taos> select mod(phase, sqrt(16)) from ts_4893.meters limit 1
mod(phase, sqrt(16)) |
============================
0.508898019790649 |
taos> select mod(round(voltage), 5) from ts_4893.meters limit 1
mod(round(voltage), 5) |
============================
1.000000000000000 |

1 1.550000000000001 taos> select MOD(10.55, 3)
2 0.550000000000001 mod(10.55, 3) |
3 0.550000000000001 ============================
4 0.550000000000001 1.550000000000001 |
5 0.550000000000001 taos> select MOD(10.55, 2)
6 -0.550000000000001 mod(10.55, 2) |
7 0.000000000000000 ============================
8 1.550000000000001 0.550000000000001 |
9 1.234567890000022e-01 taos> select MOD(10.55, 1)
10 1.234567910432816e-01 mod(10.55, 1) |
11 1.234567910432816e-01 ============================
12 1.123456791043282e+00 0.550000000000001 |
13 1.234567910432816e-01 taos> select MOD(10.55, -1)
14 1.123456791043282e+00 mod(10.55, -1) |
15 1.123456791043282e+00 ============================
16 3.123456791043282e+00 0.550000000000001 |
17 6.123456791043282e+00 taos> select MOD(10.55, -10)
18 1.123456791043282e+00 mod(10.55, -10) |
19 1.234567910432816e-01 ============================
20 1.123456791043282e+00 0.550000000000001 |
21 0.649999618530273 taos> select MOD(-10.55, 1)
22 0.574000358581543 mod(-10.55, 1) |
23 0.795000076293945 ============================
24 3.232999801635742 -0.550000000000001 |
25 0.706000328063965 taos> select MOD(99, 1)
26 2.508000373840332 mod(99, 1) |
27 2.595999717712402 ============================
28 2.961999893188477 0.000000000000000 |
29 2.225999832153320 taos> select MOD(10.55, 1) + 1
30 0.336999893188477 mod(10.55, 1) + 1 |
31 0.649999618530273 ============================
32 0.574000358581543 1.550000000000001 |
33 0.795000076293945 taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123.123456789, 9), 8), 7), 6), 5), 4), 3)
34 0.232999801635742 mod(mod(mod(mod(mod(mod(mod(123.123456789, 9), 8), 7), 6), 5), 4 |
35 0.706000328063965 ===================================================================
36 0.508000373840332 1.234567890000022e-01 |
37 0.595999717712402 taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
38 0.961999893188477 mod(mod(mod(mod(mod(mod(mod(123456789.123456789, -1), -2), -3), |
39 0.225999832153320 ===================================================================
40 0.336999893188477 1.234567910432816e-01 |
41 2.634337159700784e-01 taos> select MOD(87654321.123456789, id + 1) from ts_4893.meters order by ts limit 10
42 9.281394021770111e-01 mod(87654321.123456789, id + 1) |
43 1.296964830944782e-01 ==================================
44 3.351566768190027e+00 1.234567910432816e-01 |
45 3.272002495118848e+00 1.123456791043282e+00 |
46 2.916847677517688e+00 1.234567910432816e-01 |
47 3.097741066924800e+00 1.123456791043282e+00 |
48 3.310891102586806e+00 1.123456791043282e+00 |
49 3.350522322288470e+00 3.123456791043282e+00 |
50 3.215120509901375e+00 6.123456791043282e+00 |
51 1 1.123456791043282e+00 |
52 1 1.234567910432816e-01 |
53 0 1.123456791043282e+00 |
54 1 taos> select MOD(current, id + 1) from ts_4893.meters order by ts limit 10
55 2 mod(current, id + 1) |
56 0 ============================
57 1 0.649999618530273 |
58 2 0.574000358581543 |
59 0 0.795000076293945 |
60 1 3.232999801635742 |
61 2 0.706000328063965 |
62 0 2.508000373840332 |
63 0 2.595999717712402 |
64 1 2.961999893188477 |
65 2 2.225999832153320 |
66 0 0.336999893188477 |
67 1 taos> select MOD(current, 1) from ts_4893.meters order by ts limit 10
68 2 mod(current, 1) |
69 0 ============================
70 1 0.649999618530273 |
71 2 0.574000358581543 |
72 0 0.795000076293945 |
73 0.232999801635742 |
74 0.706000328063965 |
75 0.508000373840332 |
76 0.595999717712402 |
77 0.961999893188477 |
78 0.225999832153320 |
79 0.336999893188477 |
80 taos> select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10
81 mod(sqrt(current), abs(id + 1)) |
82 ==================================
83 2.634337159700784e-01 |
84 9.281394021770111e-01 |
85 1.296964830944782e-01 |
86 3.351566768190027e+00 |
87 3.272002495118848e+00 |
88 2.916847677517688e+00 |
89 3.097741066924800e+00 |
90 3.310891102586806e+00 |
91 3.350522322288470e+00 |
92 3.215120509901375e+00 |
93 taos> select mod(10, -3)
94 mod(10, -3) |
95 ============================
96 1.000000000000000 |
97 taos> select mod(10, 3)
98 mod(10, 3) |
99 ============================
100 1.000000000000000 |
101 taos> select mod(id, 3) from ts_4893.d0 order by ts limit 10
102 mod(id, 3) |
103 ============================
104 0.000000000000000 |
105 1.000000000000000 |
106 2.000000000000000 |
107 0.000000000000000 |
108 1.000000000000000 |
109 2.000000000000000 |
110 0.000000000000000 |
111 1.000000000000000 |
112 2.000000000000000 |
113 0.000000000000000 |
114 taos> select mod(id, 3) from ts_4893.meters order by ts limit 10
115 mod(id, 3) |
116 ============================
117 0.000000000000000 |
118 1.000000000000000 |
119 2.000000000000000 |
120 0.000000000000000 |
121 1.000000000000000 |
122 2.000000000000000 |
123 0.000000000000000 |
124 1.000000000000000 |
125 2.000000000000000 |
126 0.000000000000000 |
127 taos> select mod(null, 2)
128 mod(null, 2) |
129 ============================
130 NULL |
131 taos> select mod(10, null)
132 mod(10, null) |
133 ============================
134 NULL |
135 taos> select mod(10, 0)
136 mod(10, 0) |
137 ============================
138 NULL |
139 taos> select mod(-10, 0)
140 mod(-10, 0) |
141 ============================
142 NULL |
143 taos> select mod(5, 0)
144 mod(5, 0) |
145 ============================
146 NULL |
147 taos> select mod(0, 1)
148 mod(0, 1) |
149 ============================
150 0.000000000000000 |
151 taos> select mod(1, 1)
152 mod(1, 1) |
153 ============================
154 0.000000000000000 |
155 taos> select mod(5, 2)
156 mod(5, 2) |
157 ============================
158 1.000000000000000 |
159 taos> select mod(5, -3)
160 mod(5, -3) |
161 ============================
162 2.000000000000000 |
163 taos> select mod(15, 4)
164 mod(15, 4) |
165 ============================
166 3.000000000000000 |
167 taos> select mod(-5, 3)
168 mod(-5, 3) |
169 ============================
170 -2.000000000000000 |
171 taos> select mod(voltage, 2) from ts_4893.meters limit 1
172 mod(voltage, 2) |
173 ============================
174 1.000000000000000 |
175 taos> select mod(current, 10) from ts_4893.meters limit 1
176 mod(current, 10) |
177 ============================
178 0.649999618530273 |
179 taos> select mod(current, log(100)) from ts_4893.meters limit 1
180 mod(current, log(100)) |
181 ============================
182 1.439659246554090 |
183 taos> select mod(phase, 4) from ts_4893.meters limit 1
184 mod(phase, 4) |
185 ============================
186 0.508898019790649 |
187 taos> select mod(abs(voltage), 3) from ts_4893.meters limit 1
188 mod(abs(voltage), 3) |
189 ============================
190 2.000000000000000 |
191 taos> select mod(phase, sqrt(16)) from ts_4893.meters limit 1
192 mod(phase, sqrt(16)) |
193 ============================
194 0.508898019790649 |
195 taos> select mod(round(voltage), 5) from ts_4893.meters limit 1
196 mod(round(voltage), 5) |
197 ============================
198 1.000000000000000 |
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

View File

@ -1,235 +0,0 @@
taos> select MOD(10.55, 3)
mod(10.55, 3) |
============================
1.550000000000001 |
taos> select MOD(10.55, 2)
mod(10.55, 2) |
============================
0.550000000000001 |
taos> select MOD(10.55, 1)
mod(10.55, 1) |
============================
0.550000000000001 |
taos> select MOD(10.55, -1)
mod(10.55, -1) |
============================
0.550000000000001 |
taos> select MOD(10.55, -10)
mod(10.55, -10) |
============================
0.550000000000001 |
taos> select MOD(-10.55, 1)
mod(-10.55, 1) |
============================
-0.550000000000001 |
taos> select MOD(99, 1)
mod(99, 1) |
============================
0.000000000000000 |
taos> select MOD(10.55, 1) + 1
mod(10.55, 1) + 1 |
============================
1.550000000000001 |
taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123.123456789, 9), 8), 7), 6), 5), 4), 3)
mod(mod(mod(mod(mod(mod(mod(123.123456789, 9), 8), 7), 6), 5), 4 |
===================================================================
1.234567890000022e-01 |
taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
mod(mod(mod(mod(mod(mod(mod(123456789.123456789, -1), -2), -3), |
===================================================================
1.234567910432816e-01 |
taos> select MOD(87654321.123456789, id + 1) from ts_4893.meters order by ts limit 10
mod(87654321.123456789, id + 1) |
==================================
1.234567910432816e-01 |
1.123456791043282e+00 |
1.234567910432816e-01 |
1.123456791043282e+00 |
1.123456791043282e+00 |
3.123456791043282e+00 |
6.123456791043282e+00 |
1.123456791043282e+00 |
1.234567910432816e-01 |
1.123456791043282e+00 |
taos> select MOD(current, id + 1) from ts_4893.meters order by ts limit 10
mod(current, id + 1) |
============================
0.649999618530273 |
0.574000358581543 |
0.795000076293945 |
3.232999801635742 |
0.706000328063965 |
2.508000373840332 |
2.595999717712402 |
2.961999893188477 |
2.225999832153320 |
0.336999893188477 |
taos> select MOD(current, 1) from ts_4893.meters order by ts limit 10
mod(current, 1) |
============================
0.649999618530273 |
0.574000358581543 |
0.795000076293945 |
0.232999801635742 |
0.706000328063965 |
0.508000373840332 |
0.595999717712402 |
0.961999893188477 |
0.225999832153320 |
0.336999893188477 |
taos> select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10
mod(sqrt(current), abs(id + 1)) |
==================================
2.634337159700784e-01 |
9.281394021770111e-01 |
1.296964830944782e-01 |
3.351566768190027e+00 |
3.272002495118848e+00 |
2.916847677517688e+00 |
3.097741066924800e+00 |
3.310891102586806e+00 |
3.350522322288470e+00 |
3.215120509901375e+00 |
taos> select mod(10, -3)
mod(10, -3) |
============================
1.000000000000000 |
taos> select mod(10, 3)
mod(10, 3) |
============================
1.000000000000000 |
taos> select mod(id, 3) from ts_4893.d0 order by ts limit 10
mod(id, 3) |
============================
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
taos> select mod(id, 3) from ts_4893.meters order by ts limit 10
mod(id, 3) |
============================
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
1.000000000000000 |
2.000000000000000 |
0.000000000000000 |
taos> select mod(null, 2)
mod(null, 2) |
============================
NULL |
taos> select mod(10, null)
mod(10, null) |
============================
NULL |
taos> select mod(10, 0)
mod(10, 0) |
============================
NULL |
taos> select mod(-10, 0)
mod(-10, 0) |
============================
NULL |
taos> select mod(5, 0)
mod(5, 0) |
============================
NULL |
taos> select mod(0, 1)
mod(0, 1) |
============================
0.000000000000000 |
taos> select mod(1, 1)
mod(1, 1) |
============================
0.000000000000000 |
taos> select mod(5, 2)
mod(5, 2) |
============================
1.000000000000000 |
taos> select mod(5, -3)
mod(5, -3) |
============================
2.000000000000000 |
taos> select mod(15, 4)
mod(15, 4) |
============================
3.000000000000000 |
taos> select mod(-5, 3)
mod(-5, 3) |
============================
-2.000000000000000 |
taos> select mod(voltage, 2) from ts_4893.meters limit 1
mod(voltage, 2) |
============================
1.000000000000000 |
taos> select mod(current, 10) from ts_4893.meters limit 1
mod(current, 10) |
============================
0.649999618530273 |
taos> select mod(current, log(100)) from ts_4893.meters limit 1
mod(current, log(100)) |
============================
1.439659246554090 |
taos> select mod(phase, 4) from ts_4893.meters limit 1
mod(phase, 4) |
============================
0.508898019790649 |
taos> select mod(abs(voltage), 3) from ts_4893.meters limit 1
mod(abs(voltage), 3) |
============================
2.000000000000000 |
taos> select mod(phase, sqrt(16)) from ts_4893.meters limit 1
mod(phase, sqrt(16)) |
============================
0.508898019790649 |
taos> select mod(round(voltage), 5) from ts_4893.meters limit 1
mod(round(voltage), 5) |
============================
1.000000000000000 |
1 taos> select MOD(10.55, 3)
2 mod(10.55, 3) |
3 ============================
4 1.550000000000001 |
5 taos> select MOD(10.55, 2)
6 mod(10.55, 2) |
7 ============================
8 0.550000000000001 |
9 taos> select MOD(10.55, 1)
10 mod(10.55, 1) |
11 ============================
12 0.550000000000001 |
13 taos> select MOD(10.55, -1)
14 mod(10.55, -1) |
15 ============================
16 0.550000000000001 |
17 taos> select MOD(10.55, -10)
18 mod(10.55, -10) |
19 ============================
20 0.550000000000001 |
21 taos> select MOD(-10.55, 1)
22 mod(-10.55, 1) |
23 ============================
24 -0.550000000000001 |
25 taos> select MOD(99, 1)
26 mod(99, 1) |
27 ============================
28 0.000000000000000 |
29 taos> select MOD(10.55, 1) + 1
30 mod(10.55, 1) + 1 |
31 ============================
32 1.550000000000001 |
33 taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123.123456789, 9), 8), 7), 6), 5), 4), 3)
34 mod(mod(mod(mod(mod(mod(mod(123.123456789, 9), 8), 7), 6), 5), 4 |
35 ===================================================================
36 1.234567890000022e-01 |
37 taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
38 mod(mod(mod(mod(mod(mod(mod(123456789.123456789, -1), -2), -3), |
39 ===================================================================
40 1.234567910432816e-01 |
41 taos> select MOD(87654321.123456789, id + 1) from ts_4893.meters order by ts limit 10
42 mod(87654321.123456789, id + 1) |
43 ==================================
44 1.234567910432816e-01 |
45 1.123456791043282e+00 |
46 1.234567910432816e-01 |
47 1.123456791043282e+00 |
48 1.123456791043282e+00 |
49 3.123456791043282e+00 |
50 6.123456791043282e+00 |
51 1.123456791043282e+00 |
52 1.234567910432816e-01 |
53 1.123456791043282e+00 |
54 taos> select MOD(current, id + 1) from ts_4893.meters order by ts limit 10
55 mod(current, id + 1) |
56 ============================
57 0.649999618530273 |
58 0.574000358581543 |
59 0.795000076293945 |
60 3.232999801635742 |
61 0.706000328063965 |
62 2.508000373840332 |
63 2.595999717712402 |
64 2.961999893188477 |
65 2.225999832153320 |
66 0.336999893188477 |
67 taos> select MOD(current, 1) from ts_4893.meters order by ts limit 10
68 mod(current, 1) |
69 ============================
70 0.649999618530273 |
71 0.574000358581543 |
72 0.795000076293945 |
73 0.232999801635742 |
74 0.706000328063965 |
75 0.508000373840332 |
76 0.595999717712402 |
77 0.961999893188477 |
78 0.225999832153320 |
79 0.336999893188477 |
80 taos> select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10
81 mod(sqrt(current), abs(id + 1)) |
82 ==================================
83 2.634337159700784e-01 |
84 9.281394021770111e-01 |
85 1.296964830944782e-01 |
86 3.351566768190027e+00 |
87 3.272002495118848e+00 |
88 2.916847677517688e+00 |
89 3.097741066924800e+00 |
90 3.310891102586806e+00 |
91 3.350522322288470e+00 |
92 3.215120509901375e+00 |
93 taos> select mod(10, -3)
94 mod(10, -3) |
95 ============================
96 1.000000000000000 |
97 taos> select mod(10, 3)
98 mod(10, 3) |
99 ============================
100 1.000000000000000 |
101 taos> select mod(id, 3) from ts_4893.d0 order by ts limit 10
102 mod(id, 3) |
103 ============================
104 0.000000000000000 |
105 1.000000000000000 |
106 2.000000000000000 |
107 0.000000000000000 |
108 1.000000000000000 |
109 2.000000000000000 |
110 0.000000000000000 |
111 1.000000000000000 |
112 2.000000000000000 |
113 0.000000000000000 |
114 taos> select mod(id, 3) from ts_4893.meters order by ts limit 10
115 mod(id, 3) |
116 ============================
117 0.000000000000000 |
118 1.000000000000000 |
119 2.000000000000000 |
120 0.000000000000000 |
121 1.000000000000000 |
122 2.000000000000000 |
123 0.000000000000000 |
124 1.000000000000000 |
125 2.000000000000000 |
126 0.000000000000000 |
127 taos> select mod(null, 2)
128 mod(null, 2) |
129 ============================
130 NULL |
131 taos> select mod(10, null)
132 mod(10, null) |
133 ============================
134 NULL |
135 taos> select mod(10, 0)
136 mod(10, 0) |
137 ============================
138 NULL |
139 taos> select mod(-10, 0)
140 mod(-10, 0) |
141 ============================
142 NULL |
143 taos> select mod(5, 0)
144 mod(5, 0) |
145 ============================
146 NULL |
147 taos> select mod(0, 1)
148 mod(0, 1) |
149 ============================
150 0.000000000000000 |
151 taos> select mod(1, 1)
152 mod(1, 1) |
153 ============================
154 0.000000000000000 |
155 taos> select mod(5, 2)
156 mod(5, 2) |
157 ============================
158 1.000000000000000 |
159 taos> select mod(5, -3)
160 mod(5, -3) |
161 ============================
162 2.000000000000000 |
163 taos> select mod(15, 4)
164 mod(15, 4) |
165 ============================
166 3.000000000000000 |
167 taos> select mod(-5, 3)
168 mod(-5, 3) |
169 ============================
170 -2.000000000000000 |
171 taos> select mod(voltage, 2) from ts_4893.meters limit 1
172 mod(voltage, 2) |
173 ============================
174 1.000000000000000 |
175 taos> select mod(current, 10) from ts_4893.meters limit 1
176 mod(current, 10) |
177 ============================
178 0.649999618530273 |
179 taos> select mod(current, log(100)) from ts_4893.meters limit 1
180 mod(current, log(100)) |
181 ============================
182 1.439659246554090 |
183 taos> select mod(phase, 4) from ts_4893.meters limit 1
184 mod(phase, 4) |
185 ============================
186 0.508898019790649 |
187 taos> select mod(abs(voltage), 3) from ts_4893.meters limit 1
188 mod(abs(voltage), 3) |
189 ============================
190 2.000000000000000 |
191 taos> select mod(phase, sqrt(16)) from ts_4893.meters limit 1
192 mod(phase, sqrt(16)) |
193 ============================
194 0.508898019790649 |
195 taos> select mod(round(voltage), 5) from ts_4893.meters limit 1
196 mod(round(voltage), 5) |
197 ============================
198 1.000000000000000 |

View File

@ -1,28 +1,194 @@
3.141592653589793
4.141592653589793 taos> select pi()
2.141592653589793 pi() |
6.283185307179586 ============================
1.570796326794897 3.141592653589793 |
3.141592653589793
3.141592653589793 taos> select pi() + 1
3.141592653589793 pi() + 1 |
3.141592653589793 ============================
3.141592653589793 4.141592653589793 |
4.141592653589793
2.141592653589793 taos> select pi() - 1
6.283185307179586 pi() - 1 |
1.570796326794897 ============================
6.283185307179586 2.141592653589793 |
0.000000000000000
9.869604401089358 taos> select pi() * 2
1.000000000000000 pi() * 2 |
3.141592653589793 ============================
4.141592653589793 6.283185307179586 |
5.141592653589793
6.141592653589793 taos> select pi() / 2
7.141592653589793 pi() / 2 |
3.141592653589793 ============================
9.869604401089358 1.570796326794897 |
1.772453850905516
3 taos> select pi() from ts_4893.meters limit 5
3.141592653589793 pi() |
============================
3.141592653589793 |
3.141592653589793 |
3.141592653589793 |
3.141592653589793 |
3.141592653589793 |
taos> select pi() + 1 from ts_4893.meters limit 1
pi() + 1 |
============================
4.141592653589793 |
taos> select pi() - 1 from ts_4893.meters limit 1
pi() - 1 |
============================
2.141592653589793 |
taos> select pi() * 2 from ts_4893.meters limit 1
pi() * 2 |
============================
6.283185307179586 |
taos> select pi() / 2 from ts_4893.meters limit 1
pi() / 2 |
============================
1.570796326794897 |
taos> select pi() + pi() from ts_4893.meters limit 1
pi() + pi() |
============================
6.283185307179586 |
taos> select pi() - pi() from ts_4893.meters limit 1
pi() - pi() |
============================
0.000000000000000 |
taos> select pi() * pi() from ts_4893.meters limit 1
pi() * pi() |
============================
9.869604401089358 |
taos> select pi() / pi() from ts_4893.meters limit 1
pi() / pi() |
============================
1.000000000000000 |
taos> select pi() + id from ts_4893.meters order by ts limit 5
pi() + id |
============================
3.141592653589793 |
4.141592653589793 |
5.141592653589793 |
6.141592653589793 |
7.141592653589793 |
taos> select abs(pi())
abs(pi()) |
============================
3.141592653589793 |
taos> select pow(pi(), 2)
pow(pi(), 2) |
============================
9.869604401089358 |
taos> select sqrt(pi())
sqrt(pi()) |
============================
1.772453850905516 |
taos> select cast(pi() as int)
cast(pi() as int) |
====================
3 |
taos> select pi()
pi() |
============================
3.141592653589793 |
taos> select substring_index(null, '.', 2)
substring_index(null, '.', 2) |
================================
NULL |
taos> select pi() + null
pi() + null |
============================
NULL |
taos> select pi() * 0
pi() * 0 |
============================
0.000000000000000 |
taos> select pi() / 0
pi() / 0 |
============================
NULL |
taos> select pi() * 0.5
pi() * 0.5 |
============================
1.570796326794897 |
taos> select pi() * -1
pi() * -1 |
============================
-3.141592653589793 |
taos> select pi() * name from ts_4893.meters limit 1
pi() * name |
============================
0.000000000000000 |
taos> select pi() * voltage from ts_4893.meters limit 1
pi() * voltage |
============================
694.291976443344311 |
taos> select pi() * phase * 2 from ts_4893.meters limit 1
pi() * phase * 2 |
============================
3.197500560801395 |
taos> select round(pi(), 6)
round(pi(), 6) |
============================
3.141593000000000 |
taos> select round(pi() * phase, 2) from ts_4893.meters limit 1
round(pi() * phase, 2) |
============================
1.600000000000000 |
taos> select sqrt(pi() * voltage) from ts_4893.meters limit 1
sqrt(pi() * voltage) |
============================
26.349420799010826 |
taos> select sqrt(current / pi()) from ts_4893.meters limit 1
sqrt(current / pi()) |
============================
1.841195309148865 |
taos> select abs(pi() * phase) from ts_4893.meters limit 1
abs(pi() * phase) |
============================
1.598750280400697 |
taos> select log(pi() * voltage) from ts_4893.meters limit 1
log(pi() * voltage) |
============================
6.542892587367153 |
taos> select voltage / pi() from ts_4893.meters limit 1
voltage / pi() |
============================
70.346484846617741 |
taos> select id, case when voltage > 100 then pi() else pi() / 2 end from ts_4893.meters limit 1
id | case when voltage > 100 then pi() else pi() / 2 end |
====================================================================
0 | 3.141592653589793e+00 |

Can't render this file because it has a wrong number of fields in line 90.

View File

@ -1,194 +0,0 @@
taos> select pi()
pi() |
============================
3.141592653589793 |
taos> select pi() + 1
pi() + 1 |
============================
4.141592653589793 |
taos> select pi() - 1
pi() - 1 |
============================
2.141592653589793 |
taos> select pi() * 2
pi() * 2 |
============================
6.283185307179586 |
taos> select pi() / 2
pi() / 2 |
============================
1.570796326794897 |
taos> select pi() from ts_4893.meters limit 5
pi() |
============================
3.141592653589793 |
3.141592653589793 |
3.141592653589793 |
3.141592653589793 |
3.141592653589793 |
taos> select pi() + 1 from ts_4893.meters limit 1
pi() + 1 |
============================
4.141592653589793 |
taos> select pi() - 1 from ts_4893.meters limit 1
pi() - 1 |
============================
2.141592653589793 |
taos> select pi() * 2 from ts_4893.meters limit 1
pi() * 2 |
============================
6.283185307179586 |
taos> select pi() / 2 from ts_4893.meters limit 1
pi() / 2 |
============================
1.570796326794897 |
taos> select pi() + pi() from ts_4893.meters limit 1
pi() + pi() |
============================
6.283185307179586 |
taos> select pi() - pi() from ts_4893.meters limit 1
pi() - pi() |
============================
0.000000000000000 |
taos> select pi() * pi() from ts_4893.meters limit 1
pi() * pi() |
============================
9.869604401089358 |
taos> select pi() / pi() from ts_4893.meters limit 1
pi() / pi() |
============================
1.000000000000000 |
taos> select pi() + id from ts_4893.meters order by ts limit 5
pi() + id |
============================
3.141592653589793 |
4.141592653589793 |
5.141592653589793 |
6.141592653589793 |
7.141592653589793 |
taos> select abs(pi())
abs(pi()) |
============================
3.141592653589793 |
taos> select pow(pi(), 2)
pow(pi(), 2) |
============================
9.869604401089358 |
taos> select sqrt(pi())
sqrt(pi()) |
============================
1.772453850905516 |
taos> select cast(pi() as int)
cast(pi() as int) |
====================
3 |
taos> select pi()
pi() |
============================
3.141592653589793 |
taos> select substring_index(null, '.', 2)
substring_index(null, '.', 2) |
================================
NULL |
taos> select pi() + null
pi() + null |
============================
NULL |
taos> select pi() * 0
pi() * 0 |
============================
0.000000000000000 |
taos> select pi() / 0
pi() / 0 |
============================
NULL |
taos> select pi() * 0.5
pi() * 0.5 |
============================
1.570796326794897 |
taos> select pi() * -1
pi() * -1 |
============================
-3.141592653589793 |
taos> select pi() * name from ts_4893.meters limit 1
pi() * name |
============================
0.000000000000000 |
taos> select pi() * voltage from ts_4893.meters limit 1
pi() * voltage |
============================
694.291976443344311 |
taos> select pi() * phase * 2 from ts_4893.meters limit 1
pi() * phase * 2 |
============================
3.197500560801395 |
taos> select round(pi(), 6)
round(pi(), 6) |
============================
3.141593000000000 |
taos> select round(pi() * phase, 2) from ts_4893.meters limit 1
round(pi() * phase, 2) |
============================
1.600000000000000 |
taos> select sqrt(pi() * voltage) from ts_4893.meters limit 1
sqrt(pi() * voltage) |
============================
26.349420799010826 |
taos> select sqrt(current / pi()) from ts_4893.meters limit 1
sqrt(current / pi()) |
============================
1.841195309148865 |
taos> select abs(pi() * phase) from ts_4893.meters limit 1
abs(pi() * phase) |
============================
1.598750280400697 |
taos> select log(pi() * voltage) from ts_4893.meters limit 1
log(pi() * voltage) |
============================
6.542892587367153 |
taos> select voltage / pi() from ts_4893.meters limit 1
voltage / pi() |
============================
70.346484846617741 |
taos> select id, case when voltage > 100 then pi() else pi() / 2 end from ts_4893.meters limit 1
id | case when voltage > 100 then pi() else pi() / 2 end |
====================================================================
0 | 3.141592653589793e+00 |
Can't render this file because it has a wrong number of fields in line 90.

View File

@ -1,176 +1,447 @@
1
3 taos> select POSITION('北' IN '北京涛思')
1 position('北' in '北京涛思') |
0 ====================================
14 1 |
0
7 taos> select POSITION('涛思' IN '北京涛思')
1 position('涛思' in '北京涛思') |
1 =======================================
0 3 |
4
2 taos> select POSITION('a' IN 'abcd')
5 position('a' in 'abcd') |
4 ==========================
2 1 |
0
0 taos> select POSITION('e' IN 'abcd')
0 position('e' in 'abcd') |
0 ==========================
4 0 |
4
5 taos> select POSITION('好,' IN 'hello,world.你好,世界。')
4 position('好,' in 'hello,world.你好,世界。') |
1 =========================================================
3 14 |
4
0 taos> select POSITION(',你' IN 'hello,world.你好,世界。')
0 position(',你' in 'hello,world.你好,世界。') |
5 =========================================================
0 0 |
4
4 taos> select POSITION('world' IN 'hello,world.你好,世界。')
1 position('world' in 'hello,world.你好,世界。') |
1 ========================================================
3 7 |
4
0 taos> select POSITION('aaa' IN 'aaaaaaaaa')
0 position('aaa' in 'aaaaaaaaa') |
0 =================================
0 1 |
3
2 taos> select POSITION(CONCAT('a','b','c') IN CONCAT('abc','def','ghi'))
1 position(concat('a','b','c') in concat('abc','def','ghi')) |
4 =============================================================
3 1 |
0
0 taos> select POSITION(CONCAT('a','b','d') IN CONCAT('abc','def','ghi'))
0 position(concat('a','b','d') in concat('abc','def','ghi')) |
0 =============================================================
0 0 |
4
1 taos> select POSITION(nch2 IN nch1) from ts_4893.meters where POSITION(nch2 IN nch1) != 0 order by ts limit 5
1 position(nch2 in nch1) |
3 =========================
1 4 |
3 2 |
4 5 |
3 4 |
4 2 |
4
1 taos> select POSITION(nch2 IN nch1) from ts_4893.meters order by ts limit 5
1 position(nch2 in nch1) |
4 =========================
1 0 |
1 0 |
1 0 |
1 0 |
4 4 |
1
1 taos> select POSITION(var2 IN var1) from ts_4893.meters where POSITION(var2 IN var1) != 0 order by ts limit 5
6 position(var2 in var1) |
3 =========================
5 4 |
5 5 |
4 4 |
5 1 |
5 3 |
2
7 taos> select POSITION(var2 IN var1) from ts_4893.meters order by ts limit 5
2 position(var2 in var1) |
4 =========================
1 4 |
1 0 |
4 0 |
1 5 |
4 0 |
1
4 taos> select POSITION(var2 IN nch1) from ts_4893.meters where POSITION(var2 IN nch1) != 0 order by ts limit 5
4 position(var2 in nch1) |
1 =========================
1 4 |
1.000000000000000e+00 4 |
1 1 |
0 1 |
1 3 |
1
0 taos> select POSITION(var2 IN nch1) from ts_4893.meters order by ts limit 5
0 position(var2 in nch1) |
0 =========================
0 4 |
4 0 |
0 0 |
0 0 |
0 0 |
0
0 taos> select POSITION(nch2 IN var1) from ts_4893.meters where POSITION(nch2 IN var1) != 0 order by ts limit 5
0 position(nch2 in var1) |
0 =========================
0 3 |
0 2 |
4 1 |
0 4 |
0 3 |
0
0 taos> select POSITION(nch2 IN var1) from ts_4893.meters order by ts limit 5
0 position(nch2 in var1) |
0 =========================
0 0 |
0 0 |
0 0 |
0 0 |
0 0 |
0
0 taos> select POSITION('a' IN nch1) from ts_4893.meters where POSITION('a' IN nch1) != 0 order by ts limit 5
0 position('a' in nch1) |
0 ========================
0 4 |
0 1 |
0 1 |
0 3 |
0 1 |
0
0 taos> select POSITION('a' IN var1) from ts_4893.meters where POSITION('a' IN var1) != 0 order by ts limit 5
0 position('a' in var1) |
0 ========================
0 3 |
4 4 |
0 3 |
0 4 |
0 4 |
0
0 taos> select POSITION('一' IN nch1) from ts_4893.meters where POSITION('一' IN nch1) != 0 order by ts limit 5
0 position('一' in nch1) |
0 ==========================
4 1 |
0 1 |
4 4 |
0 1 |
0 1 |
0
0 taos> select POSITION('一' IN var1) from ts_4893.meters where POSITION('一' IN var1) != 0 order by ts limit 5
0 position('一' in var1) |
0 ==========================
0 1 |
4 1 |
0 4 |
4 1 |
0 1 |
0
5 taos> select POSITION(nch2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(nch2 IN 'abcdefghijklmn') != 0 order by ts limit 5
0 position(nch2 in 'abcdefghijklmn') |
0 =====================================
0 6 |
0 3 |
0 5 |
0 5 |
4 4 |
0
0 taos> select POSITION(var2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(var2 IN 'abcdefghijklmn') != 0 order by ts limit 5
5 position(var2 in 'abcdefghijklmn') |
0 =====================================
0 5 |
0 5 |
0 2 |
0 7 |
0 2 |
taos> select POSITION(nch2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(nch2 IN '一二三四五六七八九十') != 0 order by ts limit 5
position(nch2 in '一二三四五六七八九十') |
=====================================================
4 |
1 |
1 |
4 |
1 |
taos> select POSITION(var2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(var2 IN '一二三四五六七八九十') != 0 order by ts limit 5
position(var2 in '一二三四五六七八九十') |
=====================================================
4 |
1 |
4 |
4 |
1 |
taos> select ABS(POSITION('aaa' IN 'aaaaaaaaa'))
abs(position('aaa' in 'aaaaaaaaa')) |
======================================
1 |
taos> select POW(POSITION('aaa' IN 'aaaaaaaaa'), 2)
pow(position('aaa' in 'aaaaaaaaa'), 2) |
=========================================
1.000000000000000e+00 |
taos> select position('t' in 'taos')
position('t' in 'taos') |
==========================
1 |
taos> select position('ustc' in 'taos')
position('ustc' in 'taos') |
=============================
0 |
taos> select position('' in '')
position('' in '') |
========================
1 |
taos> select position('' in 'taos')
position('' in 'taos') |
=========================
1 |
taos> select position(nch2 in nch1) from ts_4893.d0 order by ts limit 10
position(nch2 in nch1) |
=========================
0 |
0 |
0 |
0 |
4 |
0 |
0 |
0 |
0 |
0 |
taos> select position(nch2 in nch1) from ts_4893.meters order by ts limit 10
position(nch2 in nch1) |
=========================
0 |
0 |
0 |
0 |
4 |
0 |
0 |
0 |
0 |
0 |
taos> select position(nch2 in var1) from ts_4893.d0 order by ts limit 10
position(nch2 in var1) |
=========================
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position(nch2 in var1) from ts_4893.meters order by ts limit 10
position(nch2 in var1) |
=========================
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position(var2 in nch1) from ts_4893.d0 order by ts limit 10
position(var2 in nch1) |
=========================
4 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
4 |
0 |
taos> select position(var2 in nch1) from ts_4893.meters order by ts limit 10
position(var2 in nch1) |
=========================
4 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
4 |
0 |
taos> select position(var2 in var1) from ts_4893.d0 order by ts limit 10
position(var2 in var1) |
=========================
4 |
0 |
0 |
5 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position(var2 in var1) from ts_4893.meters order by ts limit 10
position(var2 in var1) |
=========================
4 |
0 |
0 |
5 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position('t' in null)
position('t' in null) |
========================
NULL |
taos> select position(null in 'taos')
position(null in 'taos') |
===========================
NULL |
taos> select position('' in 'A')
position('' in 'A') |
========================
1 |
taos> select position('A' in 'A')
position('A' in 'A') |
========================
1 |
taos> select position('A' in '')
position('A' in '') |
========================
0 |
taos> select position('A' in null)
position('A' in null) |
========================
NULL |
taos> select position('Z' in 'ABC')
position('Z' in 'ABC') |
=========================
0 |
taos> select position('l' in 'Hello')
position('l' in 'Hello') |
===========================
3 |
taos> select position('s' in 'meters')
position('s' in 'meters') |
============================
6 |
taos> select position('中' in '中国')
position('中' in '中国') |
==============================
1 |
taos> select position('e' in 'é')
position('e' in 'é') |
========================
0 |
taos> select position('W' in 'Hello World')
position('W' in 'Hello World') |
=================================
7 |
taos> select position('@' in '!@#')
position('@' in '!@#') |
=========================
2 |
taos> select position('6' in '12345')
position('6' in '12345') |
===========================
0 |
taos> select position('A' in trim(' A '))
position('A' in trim(' A ')) |
===============================
1 |
taos> select position('A' in upper('abc'))
position('A' in upper('abc')) |
================================
1 |
taos> select position('B' in concat('A', 'B'))
position('B' in concat('A', 'B')) |
====================================
2 |
taos> select position('x' in replace('Hello', 'l', 'x'))
position('x' in replace('Hello', 'l', 'x')) |
==============================================
3 |
taos> select name, position('e' in name) from ts_4893.meters limit 1
name | position('e' in name) |
=========================================================
lili | 0 |
taos> select name, position('a' in substring(name, 2, 5)) from ts_4893.meters limit 1
name | position('a' in substring(name, 2, 5)) |
==========================================================================
lili | 0 |
taos> select nch1, position('n' in nch1) from ts_4893.meters limit 1
nch1 | position('n' in nch1) |
=========================================================
novel | 1 |
taos> select var1, position('1' in var1) from ts_4893.meters limit 1
var1 | position('1' in var1) |
=========================================================
novel | 0 |

Can't render this file because it has a wrong number of fields in line 22.

View File

@ -1,447 +0,0 @@
taos> select POSITION('北' IN '北京涛思')
position('北' in '北京涛思') |
====================================
1 |
taos> select POSITION('涛思' IN '北京涛思')
position('涛思' in '北京涛思') |
=======================================
3 |
taos> select POSITION('a' IN 'abcd')
position('a' in 'abcd') |
==========================
1 |
taos> select POSITION('e' IN 'abcd')
position('e' in 'abcd') |
==========================
0 |
taos> select POSITION('好,' IN 'hello,world.你好,世界。')
position('好,' in 'hello,world.你好,世界。') |
=========================================================
14 |
taos> select POSITION(',你' IN 'hello,world.你好,世界。')
position(',你' in 'hello,world.你好,世界。') |
=========================================================
0 |
taos> select POSITION('world' IN 'hello,world.你好,世界。')
position('world' in 'hello,world.你好,世界。') |
========================================================
7 |
taos> select POSITION('aaa' IN 'aaaaaaaaa')
position('aaa' in 'aaaaaaaaa') |
=================================
1 |
taos> select POSITION(CONCAT('a','b','c') IN CONCAT('abc','def','ghi'))
position(concat('a','b','c') in concat('abc','def','ghi')) |
=============================================================
1 |
taos> select POSITION(CONCAT('a','b','d') IN CONCAT('abc','def','ghi'))
position(concat('a','b','d') in concat('abc','def','ghi')) |
=============================================================
0 |
taos> select POSITION(nch2 IN nch1) from ts_4893.meters where POSITION(nch2 IN nch1) != 0 order by ts limit 5
position(nch2 in nch1) |
=========================
4 |
2 |
5 |
4 |
2 |
taos> select POSITION(nch2 IN nch1) from ts_4893.meters order by ts limit 5
position(nch2 in nch1) |
=========================
0 |
0 |
0 |
0 |
4 |
taos> select POSITION(var2 IN var1) from ts_4893.meters where POSITION(var2 IN var1) != 0 order by ts limit 5
position(var2 in var1) |
=========================
4 |
5 |
4 |
1 |
3 |
taos> select POSITION(var2 IN var1) from ts_4893.meters order by ts limit 5
position(var2 in var1) |
=========================
4 |
0 |
0 |
5 |
0 |
taos> select POSITION(var2 IN nch1) from ts_4893.meters where POSITION(var2 IN nch1) != 0 order by ts limit 5
position(var2 in nch1) |
=========================
4 |
4 |
1 |
1 |
3 |
taos> select POSITION(var2 IN nch1) from ts_4893.meters order by ts limit 5
position(var2 in nch1) |
=========================
4 |
0 |
0 |
0 |
0 |
taos> select POSITION(nch2 IN var1) from ts_4893.meters where POSITION(nch2 IN var1) != 0 order by ts limit 5
position(nch2 in var1) |
=========================
3 |
2 |
1 |
4 |
3 |
taos> select POSITION(nch2 IN var1) from ts_4893.meters order by ts limit 5
position(nch2 in var1) |
=========================
0 |
0 |
0 |
0 |
0 |
taos> select POSITION('a' IN nch1) from ts_4893.meters where POSITION('a' IN nch1) != 0 order by ts limit 5
position('a' in nch1) |
========================
4 |
1 |
1 |
3 |
1 |
taos> select POSITION('a' IN var1) from ts_4893.meters where POSITION('a' IN var1) != 0 order by ts limit 5
position('a' in var1) |
========================
3 |
4 |
3 |
4 |
4 |
taos> select POSITION('一' IN nch1) from ts_4893.meters where POSITION('一' IN nch1) != 0 order by ts limit 5
position('一' in nch1) |
==========================
1 |
1 |
4 |
1 |
1 |
taos> select POSITION('一' IN var1) from ts_4893.meters where POSITION('一' IN var1) != 0 order by ts limit 5
position('一' in var1) |
==========================
1 |
1 |
4 |
1 |
1 |
taos> select POSITION(nch2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(nch2 IN 'abcdefghijklmn') != 0 order by ts limit 5
position(nch2 in 'abcdefghijklmn') |
=====================================
6 |
3 |
5 |
5 |
4 |
taos> select POSITION(var2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(var2 IN 'abcdefghijklmn') != 0 order by ts limit 5
position(var2 in 'abcdefghijklmn') |
=====================================
5 |
5 |
2 |
7 |
2 |
taos> select POSITION(nch2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(nch2 IN '一二三四五六七八九十') != 0 order by ts limit 5
position(nch2 in '一二三四五六七八九十') |
=====================================================
4 |
1 |
1 |
4 |
1 |
taos> select POSITION(var2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(var2 IN '一二三四五六七八九十') != 0 order by ts limit 5
position(var2 in '一二三四五六七八九十') |
=====================================================
4 |
1 |
4 |
4 |
1 |
taos> select ABS(POSITION('aaa' IN 'aaaaaaaaa'))
abs(position('aaa' in 'aaaaaaaaa')) |
======================================
1 |
taos> select POW(POSITION('aaa' IN 'aaaaaaaaa'), 2)
pow(position('aaa' in 'aaaaaaaaa'), 2) |
=========================================
1.000000000000000e+00 |
taos> select position('t' in 'taos')
position('t' in 'taos') |
==========================
1 |
taos> select position('ustc' in 'taos')
position('ustc' in 'taos') |
=============================
0 |
taos> select position('' in '')
position('' in '') |
========================
1 |
taos> select position('' in 'taos')
position('' in 'taos') |
=========================
1 |
taos> select position(nch2 in nch1) from ts_4893.d0 order by ts limit 10
position(nch2 in nch1) |
=========================
0 |
0 |
0 |
0 |
4 |
0 |
0 |
0 |
0 |
0 |
taos> select position(nch2 in nch1) from ts_4893.meters order by ts limit 10
position(nch2 in nch1) |
=========================
0 |
0 |
0 |
0 |
4 |
0 |
0 |
0 |
0 |
0 |
taos> select position(nch2 in var1) from ts_4893.d0 order by ts limit 10
position(nch2 in var1) |
=========================
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position(nch2 in var1) from ts_4893.meters order by ts limit 10
position(nch2 in var1) |
=========================
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position(var2 in nch1) from ts_4893.d0 order by ts limit 10
position(var2 in nch1) |
=========================
4 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
4 |
0 |
taos> select position(var2 in nch1) from ts_4893.meters order by ts limit 10
position(var2 in nch1) |
=========================
4 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
4 |
0 |
taos> select position(var2 in var1) from ts_4893.d0 order by ts limit 10
position(var2 in var1) |
=========================
4 |
0 |
0 |
5 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position(var2 in var1) from ts_4893.meters order by ts limit 10
position(var2 in var1) |
=========================
4 |
0 |
0 |
5 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select position('t' in null)
position('t' in null) |
========================
NULL |
taos> select position(null in 'taos')
position(null in 'taos') |
===========================
NULL |
taos> select position('' in 'A')
position('' in 'A') |
========================
1 |
taos> select position('A' in 'A')
position('A' in 'A') |
========================
1 |
taos> select position('A' in '')
position('A' in '') |
========================
0 |
taos> select position('A' in null)
position('A' in null) |
========================
NULL |
taos> select position('Z' in 'ABC')
position('Z' in 'ABC') |
=========================
0 |
taos> select position('l' in 'Hello')
position('l' in 'Hello') |
===========================
3 |
taos> select position('s' in 'meters')
position('s' in 'meters') |
============================
6 |
taos> select position('中' in '中国')
position('中' in '中国') |
==============================
1 |
taos> select position('e' in 'é')
position('e' in 'é') |
========================
0 |
taos> select position('W' in 'Hello World')
position('W' in 'Hello World') |
=================================
7 |
taos> select position('@' in '!@#')
position('@' in '!@#') |
=========================
2 |
taos> select position('6' in '12345')
position('6' in '12345') |
===========================
0 |
taos> select position('A' in trim(' A '))
position('A' in trim(' A ')) |
===============================
1 |
taos> select position('A' in upper('abc'))
position('A' in upper('abc')) |
================================
1 |
taos> select position('B' in concat('A', 'B'))
position('B' in concat('A', 'B')) |
====================================
2 |
taos> select position('x' in replace('Hello', 'l', 'x'))
position('x' in replace('Hello', 'l', 'x')) |
==============================================
3 |
taos> select name, position('e' in name) from ts_4893.meters limit 1
name | position('e' in name) |
=========================================================
lili | 0 |
taos> select name, position('a' in substring(name, 2, 5)) from ts_4893.meters limit 1
name | position('a' in substring(name, 2, 5)) |
==========================================================================
lili | 0 |
taos> select nch1, position('n' in nch1) from ts_4893.meters limit 1
nch1 | position('n' in nch1) |
=========================================================
novel | 1 |
taos> select var1, position('1' in var1) from ts_4893.meters limit 1
var1 | position('1' in var1) |
=========================================================
novel | 0 |
Can't render this file because it has a wrong number of fields in line 22.

View File

@ -1,66 +1,275 @@
0.000000000000000
0.017453292519943 taos> select RADIANS(0)
0.026179938779915 radians(0) |
1.745329251994330 ============================
-0.017453292519943 0.000000000000000 |
-0.026179938779915
-1.745329251994330 taos> select RADIANS(1)
1.017453292519943 radians(1) |
-0.982546707480057 ============================
0.017453292519943 0.017453292519943 |
0.017453292519943
0.017453292519943 taos> select RADIANS(1.5)
0.017453292519943 radians(1.5) |
0.017453292519943 ============================
0.017453292519943 0.026179938779915 |
0.017453292519943
1.017453292519943 taos> select RADIANS(100)
-0.982546707480057 radians(100) |
0.034906585039887 ============================
0.008726646259972 1.745329251994330 |
0.052359877559830
0.017453292519943 taos> select RADIANS(-1)
0.000609234839573 radians(-1) |
2.000000000000000 ============================
0.017453292519943 -0.017453292519943 |
1.017453292519943
2.017453292519943 taos> select RADIANS(-1.5)
3.017453292519943 radians(-1.5) |
4.017453292519943 ============================
0.000000000000000 -0.026179938779915 |
1.017453292519943
2.034906585039887 taos> select RADIANS(-100)
3.052359877559830 radians(-100) |
4.069813170079773 ============================
0.174532925199433 -1.745329251994330 |
3.141592653589793
0.174532925199433 taos> select RADIANS(1) + 1
0.030461741978671 radians(1) + 1 |
0.417771379105167 ============================
0 1.017453292519943 |
0.000000000000000
0.017453292519943 taos> select RADIANS(1) - 1
0.024682682989769 radians(1) - 1 |
0.030229989403904 ============================
0.034906585039887 -0.982546707480057 |
3.141592653589793
0.185877558679493 taos> select RADIANS(1) * 1
0.149644536324422 radians(1) * 1 |
0.170955001564425 ============================
0.196052831414414 0.017453292519943 |
0.186854955444309
0.148492619284422 taos> select RADIANS(1) / 1
0.167481790094528 radians(1) / 1 |
0.191322990739406 ============================
0.195930658899406 0.017453292519943 |
0.180414682914441
0.185877558679493 taos> select RADIANS(1) from ts_4893.meters limit 5
0.149644536324422 radians(1) |
0.170955001564425 ============================
0.196052831414414 0.017453292519943 |
0.186854955444309 0.017453292519943 |
0.148492619284422 0.017453292519943 |
0.167481790094528 0.017453292519943 |
0.191322990739406 0.017453292519943 |
0.195930658899406
0.180414682914441 taos> select RADIANS(1) + 1 from ts_4893.meters limit 1
radians(1) + 1 |
============================
1.017453292519943 |
taos> select RADIANS(1) - 1 from ts_4893.meters limit 1
radians(1) - 1 |
============================
-0.982546707480057 |
taos> select RADIANS(1) * 2 from ts_4893.meters limit 1
radians(1) * 2 |
============================
0.034906585039887 |
taos> select RADIANS(1) / 2 from ts_4893.meters limit 1
radians(1) / 2 |
============================
0.008726646259972 |
taos> select RADIANS(2) + RADIANS(1) from ts_4893.meters limit 1
radians(2) + radians(1) |
============================
0.052359877559830 |
taos> select RADIANS(2) - RADIANS(1) from ts_4893.meters limit 1
radians(2) - radians(1) |
============================
0.017453292519943 |
taos> select RADIANS(2) * RADIANS(1) from ts_4893.meters limit 1
radians(2) * radians(1) |
============================
0.000609234839573 |
taos> select RADIANS(2) / RADIANS(1) from ts_4893.meters limit 1
radians(2) / radians(1) |
============================
2.000000000000000 |
taos> select RADIANS(1) + id from ts_4893.meters order by ts limit 5
radians(1) + id |
============================
0.017453292519943 |
1.017453292519943 |
2.017453292519943 |
3.017453292519943 |
4.017453292519943 |
taos> select RADIANS(id) + id from ts_4893.meters order by ts limit 5
radians(id) + id |
============================
0.000000000000000 |
1.017453292519943 |
2.034906585039887 |
3.052359877559830 |
4.069813170079773 |
taos> select RADIANS(abs(10))
radians(abs(10)) |
============================
0.174532925199433 |
taos> select RADIANS(DEGREES(PI()))
radians(degrees(pi())) |
============================
3.141592653589793 |
taos> select abs(RADIANS(10))
abs(radians(10)) |
============================
0.174532925199433 |
taos> select pow(RADIANS(10), 2)
pow(radians(10), 2) |
============================
0.030461741978671 |
taos> select sqrt(RADIANS(10))
sqrt(radians(10)) |
============================
0.417771379105167 |
taos> select cast(RADIANS(10) as int)
cast(radians(10) as int) |
===========================
0 |
taos> select RADIANS(sqrt(id)) from ts_4893.meters order by ts limit 5
radians(sqrt(id)) |
============================
0.000000000000000 |
0.017453292519943 |
0.024682682989769 |
0.030229989403904 |
0.034906585039887 |
taos> select radians(180)
radians(180) |
============================
3.141592653589793 |
taos> select radians(current) from ts_4893.d0 order by ts limit 10
radians(current) |
============================
0.185877558679493 |
0.149644536324422 |
0.170955001564425 |
0.196052831414414 |
0.186854955444309 |
0.148492619284422 |
0.167481790094528 |
0.191322990739406 |
0.195930658899406 |
0.180414682914441 |
taos> select radians(current) from ts_4893.meters order by ts limit 10
radians(current) |
============================
0.185877558679493 |
0.149644536324422 |
0.170955001564425 |
0.196052831414414 |
0.186854955444309 |
0.148492619284422 |
0.167481790094528 |
0.191322990739406 |
0.195930658899406 |
0.180414682914441 |
taos> select radians(null)
radians(null) |
============================
NULL |
taos> select radians(0)
radians(0) |
============================
0.000000000000000 |
taos> select radians(45)
radians(45) |
============================
0.785398163397448 |
taos> select radians(-45)
radians(-45) |
============================
-0.785398163397448 |
taos> select radians(90)
radians(90) |
============================
1.570796326794897 |
taos> select radians(-90)
radians(-90) |
============================
-1.570796326794897 |
taos> select radians(360)
radians(360) |
============================
6.283185307179586 |
taos> select radians(1000000)
radians(1000000) |
============================
17453.292519943293883 |
taos> select radians(sin(1))
radians(sin(1)) |
============================
0.014686439244897 |
taos> select radians(cos(1))
radians(cos(1)) |
============================
0.009430054193517 |
taos> select radians(tan(1))
radians(tan(1)) |
============================
0.027181892591221 |
taos> select radians(degrees(90))
radians(degrees(90)) |
============================
89.999999999999986 |
taos> select radians(atan(1))
radians(atan(1)) |
============================
0.013707783890402 |
taos> select radians(current) from ts_4893.meters limit 1
radians(current) |
============================
0.185877558679493 |
taos> select radians(voltage) from ts_4893.meters limit 1
radians(voltage) |
============================
3.857177646907469 |
taos> select radians(phase) from ts_4893.meters limit 1
radians(phase) |
============================
0.008881946002226 |

Can't render this file because it has a wrong number of fields in line 139.

View File

@ -1,275 +0,0 @@
taos> select RADIANS(0)
radians(0) |
============================
0.000000000000000 |
taos> select RADIANS(1)
radians(1) |
============================
0.017453292519943 |
taos> select RADIANS(1.5)
radians(1.5) |
============================
0.026179938779915 |
taos> select RADIANS(100)
radians(100) |
============================
1.745329251994330 |
taos> select RADIANS(-1)
radians(-1) |
============================
-0.017453292519943 |
taos> select RADIANS(-1.5)
radians(-1.5) |
============================
-0.026179938779915 |
taos> select RADIANS(-100)
radians(-100) |
============================
-1.745329251994330 |
taos> select RADIANS(1) + 1
radians(1) + 1 |
============================
1.017453292519943 |
taos> select RADIANS(1) - 1
radians(1) - 1 |
============================
-0.982546707480057 |
taos> select RADIANS(1) * 1
radians(1) * 1 |
============================
0.017453292519943 |
taos> select RADIANS(1) / 1
radians(1) / 1 |
============================
0.017453292519943 |
taos> select RADIANS(1) from ts_4893.meters limit 5
radians(1) |
============================
0.017453292519943 |
0.017453292519943 |
0.017453292519943 |
0.017453292519943 |
0.017453292519943 |
taos> select RADIANS(1) + 1 from ts_4893.meters limit 1
radians(1) + 1 |
============================
1.017453292519943 |
taos> select RADIANS(1) - 1 from ts_4893.meters limit 1
radians(1) - 1 |
============================
-0.982546707480057 |
taos> select RADIANS(1) * 2 from ts_4893.meters limit 1
radians(1) * 2 |
============================
0.034906585039887 |
taos> select RADIANS(1) / 2 from ts_4893.meters limit 1
radians(1) / 2 |
============================
0.008726646259972 |
taos> select RADIANS(2) + RADIANS(1) from ts_4893.meters limit 1
radians(2) + radians(1) |
============================
0.052359877559830 |
taos> select RADIANS(2) - RADIANS(1) from ts_4893.meters limit 1
radians(2) - radians(1) |
============================
0.017453292519943 |
taos> select RADIANS(2) * RADIANS(1) from ts_4893.meters limit 1
radians(2) * radians(1) |
============================
0.000609234839573 |
taos> select RADIANS(2) / RADIANS(1) from ts_4893.meters limit 1
radians(2) / radians(1) |
============================
2.000000000000000 |
taos> select RADIANS(1) + id from ts_4893.meters order by ts limit 5
radians(1) + id |
============================
0.017453292519943 |
1.017453292519943 |
2.017453292519943 |
3.017453292519943 |
4.017453292519943 |
taos> select RADIANS(id) + id from ts_4893.meters order by ts limit 5
radians(id) + id |
============================
0.000000000000000 |
1.017453292519943 |
2.034906585039887 |
3.052359877559830 |
4.069813170079773 |
taos> select RADIANS(abs(10))
radians(abs(10)) |
============================
0.174532925199433 |
taos> select RADIANS(DEGREES(PI()))
radians(degrees(pi())) |
============================
3.141592653589793 |
taos> select abs(RADIANS(10))
abs(radians(10)) |
============================
0.174532925199433 |
taos> select pow(RADIANS(10), 2)
pow(radians(10), 2) |
============================
0.030461741978671 |
taos> select sqrt(RADIANS(10))
sqrt(radians(10)) |
============================
0.417771379105167 |
taos> select cast(RADIANS(10) as int)
cast(radians(10) as int) |
===========================
0 |
taos> select RADIANS(sqrt(id)) from ts_4893.meters order by ts limit 5
radians(sqrt(id)) |
============================
0.000000000000000 |
0.017453292519943 |
0.024682682989769 |
0.030229989403904 |
0.034906585039887 |
taos> select radians(180)
radians(180) |
============================
3.141592653589793 |
taos> select radians(current) from ts_4893.d0 order by ts limit 10
radians(current) |
============================
0.185877558679493 |
0.149644536324422 |
0.170955001564425 |
0.196052831414414 |
0.186854955444309 |
0.148492619284422 |
0.167481790094528 |
0.191322990739406 |
0.195930658899406 |
0.180414682914441 |
taos> select radians(current) from ts_4893.meters order by ts limit 10
radians(current) |
============================
0.185877558679493 |
0.149644536324422 |
0.170955001564425 |
0.196052831414414 |
0.186854955444309 |
0.148492619284422 |
0.167481790094528 |
0.191322990739406 |
0.195930658899406 |
0.180414682914441 |
taos> select radians(null)
radians(null) |
============================
NULL |
taos> select radians(0)
radians(0) |
============================
0.000000000000000 |
taos> select radians(45)
radians(45) |
============================
0.785398163397448 |
taos> select radians(-45)
radians(-45) |
============================
-0.785398163397448 |
taos> select radians(90)
radians(90) |
============================
1.570796326794897 |
taos> select radians(-90)
radians(-90) |
============================
-1.570796326794897 |
taos> select radians(360)
radians(360) |
============================
6.283185307179586 |
taos> select radians(1000000)
radians(1000000) |
============================
17453.292519943293883 |
taos> select radians(sin(1))
radians(sin(1)) |
============================
0.014686439244897 |
taos> select radians(cos(1))
radians(cos(1)) |
============================
0.009430054193517 |
taos> select radians(tan(1))
radians(tan(1)) |
============================
0.027181892591221 |
taos> select radians(degrees(90))
radians(degrees(90)) |
============================
89.999999999999986 |
taos> select radians(atan(1))
radians(atan(1)) |
============================
0.013707783890402 |
taos> select radians(current) from ts_4893.meters limit 1
radians(current) |
============================
0.185877558679493 |
taos> select radians(voltage) from ts_4893.meters limit 1
radians(voltage) |
============================
3.857177646907469 |
taos> select radians(phase) from ts_4893.meters limit 1
radians(phase) |
============================
0.008881946002226 |
Can't render this file because it has a wrong number of fields in line 139.

View File

@ -1,21 +1,173 @@
0.663936012733698
0.840187717154710 taos> select RAND(1245)
0.840187717154710 rand(1245) |
0.700976369297587 ============================
0.561380175203728 0.663936012733698 |
0.916457875592847
0.274745596235034 taos> select RAND(id) from ts_4893.d0 limit 10
0.135438768721856 rand(id) |
0.486904139391568 ============================
0.352760728612896 0.840187717154710 |
0.206965447965528 0.840187717154710 |
0.419929514834624 0.700976369297587 |
0.419929514834624 0.561380175203728 |
0.419929514834624 0.916457875592847 |
0.419929514834624 0.274745596235034 |
0.419929514834624 0.135438768721856 |
0.419929514834624 0.486904139391568 |
0.419929514834624 0.352760728612896 |
0.419929514834624 0.206965447965528 |
0.419929514834624
0.419929514834624 taos> select RAND(id) from ts_4893.d0 order by id desc limit 10
rand(id) |
============================
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
taos> select rand(0)
rand(0) |
============================
0.840187717154710 |
taos> select rand(1)
rand(1) |
============================
0.840187717154710 |
taos> select rand(-1)
rand(-1) |
============================
0.118708995691831 |
taos> select rand(12345678901234567890)
rand(12345678901234567890) |
=============================
2.008294813338805e-01 |
taos> select rand(-12345678901234567890)
rand(-12345678901234567890) |
==============================
8.401877171547095e-01 |
taos> select rand(12345), rand(12345)
rand(12345) | rand(12345) |
========================================================
0.178395304446293 | 0.178395304446293 |
taos> select rand(9999999999) where rand(9999999999) >= 0 and rand(9999999999) < 1
rand(9999999999) |
============================
0.321409397442550 |
taos> select rand(id) from ts_4893.meters limit 100
rand(id) |
============================
0.840187717154710 |
0.840187717154710 |
0.700976369297587 |
0.561380175203728 |
0.916457875592847 |
0.274745596235034 |
0.135438768721856 |
0.486904139391568 |
0.352760728612896 |
0.206965447965528 |
0.565810732341283 |
0.926345318521534 |
0.785600282617658 |
0.632643183056565 |
0.999498499557142 |
0.354973177125199 |
0.215437470104283 |
0.571794000254848 |
0.929072778173291 |
0.290233385418650 |
0.148812267532950 |
0.505899571117898 |
0.865026922367991 |
0.727581746283724 |
0.087714229285584 |
0.939356191986872 |
0.795545781867367 |
0.659832971943465 |
0.517155105023251 |
0.875989373715589 |
0.229967075041480 |
0.592119012303706 |
0.449675684072858 |
0.307948935454688 |
0.168970021497910 |
0.524489704763745 |
0.381259786142623 |
0.239412393066758 |
0.598226357529977 |
0.957148446215851 |
0.819422913165494 |
0.670246056127477 |
0.033469948001890 |
0.392149003405193 |
0.749737140606035 |
0.608923980318440 |
0.469695958061933 |
0.825680229266025 |
0.683865774275673 |
0.041811583583155 |
0.894321223206036 |
0.760580372885140 |
0.615916447069457 |
0.977703406930763 |
0.329537633959920 |
0.193522962831670 |
0.052021294390793 |
0.911150676622591 |
0.766549994129012 |
0.126697651635249 |
0.985316422761100 |
0.843173408342140 |
0.699550600116863 |
0.557263156192965 |
0.419794161068180 |
0.278590486048996 |
0.133239280028846 |
0.488706417143674 |
0.854142372894167 |
0.710721029765308 |
0.570226699379378 |
0.424855420563768 |
0.283543675338637 |
0.137892492179709 |
0.998458440880505 |
0.356983164025928 |
0.218767986269094 |
0.076468908263589 |
0.431104593179703 |
0.293163777931204 |
0.650123746902740 |
0.510736836358317 |
0.864335399057872 |
0.725284450559544 |
0.085677149279824 |
0.942077809917777 |
0.798407114482674 |
0.163865051774245 |
0.017995767769402 |
0.879516513030751 |
0.736922031145972 |
0.589669372695344 |
0.954449085497507 |
0.811225361568493 |
0.172090128609953 |
0.525153056031630 |
0.386470556904781 |
0.744990266275122 |
0.100015020510189 |
0.460091779222755 |

Can't render this file because it has a wrong number of fields in line 60.

View File

@ -1,173 +0,0 @@
taos> select RAND(1245)
rand(1245) |
============================
0.663936012733698 |
taos> select RAND(id) from ts_4893.d0 limit 10
rand(id) |
============================
0.840187717154710 |
0.840187717154710 |
0.700976369297587 |
0.561380175203728 |
0.916457875592847 |
0.274745596235034 |
0.135438768721856 |
0.486904139391568 |
0.352760728612896 |
0.206965447965528 |
taos> select RAND(id) from ts_4893.d0 order by id desc limit 10
rand(id) |
============================
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
0.419929514834624 |
taos> select rand(0)
rand(0) |
============================
0.840187717154710 |
taos> select rand(1)
rand(1) |
============================
0.840187717154710 |
taos> select rand(-1)
rand(-1) |
============================
0.118708995691831 |
taos> select rand(12345678901234567890)
rand(12345678901234567890) |
=============================
2.008294813338805e-01 |
taos> select rand(-12345678901234567890)
rand(-12345678901234567890) |
==============================
8.401877171547095e-01 |
taos> select rand(12345), rand(12345)
rand(12345) | rand(12345) |
========================================================
0.178395304446293 | 0.178395304446293 |
taos> select rand(9999999999) where rand(9999999999) >= 0 and rand(9999999999) < 1
rand(9999999999) |
============================
0.321409397442550 |
taos> select rand(id) from ts_4893.meters limit 100
rand(id) |
============================
0.840187717154710 |
0.840187717154710 |
0.700976369297587 |
0.561380175203728 |
0.916457875592847 |
0.274745596235034 |
0.135438768721856 |
0.486904139391568 |
0.352760728612896 |
0.206965447965528 |
0.565810732341283 |
0.926345318521534 |
0.785600282617658 |
0.632643183056565 |
0.999498499557142 |
0.354973177125199 |
0.215437470104283 |
0.571794000254848 |
0.929072778173291 |
0.290233385418650 |
0.148812267532950 |
0.505899571117898 |
0.865026922367991 |
0.727581746283724 |
0.087714229285584 |
0.939356191986872 |
0.795545781867367 |
0.659832971943465 |
0.517155105023251 |
0.875989373715589 |
0.229967075041480 |
0.592119012303706 |
0.449675684072858 |
0.307948935454688 |
0.168970021497910 |
0.524489704763745 |
0.381259786142623 |
0.239412393066758 |
0.598226357529977 |
0.957148446215851 |
0.819422913165494 |
0.670246056127477 |
0.033469948001890 |
0.392149003405193 |
0.749737140606035 |
0.608923980318440 |
0.469695958061933 |
0.825680229266025 |
0.683865774275673 |
0.041811583583155 |
0.894321223206036 |
0.760580372885140 |
0.615916447069457 |
0.977703406930763 |
0.329537633959920 |
0.193522962831670 |
0.052021294390793 |
0.911150676622591 |
0.766549994129012 |
0.126697651635249 |
0.985316422761100 |
0.843173408342140 |
0.699550600116863 |
0.557263156192965 |
0.419794161068180 |
0.278590486048996 |
0.133239280028846 |
0.488706417143674 |
0.854142372894167 |
0.710721029765308 |
0.570226699379378 |
0.424855420563768 |
0.283543675338637 |
0.137892492179709 |
0.998458440880505 |
0.356983164025928 |
0.218767986269094 |
0.076468908263589 |
0.431104593179703 |
0.293163777931204 |
0.650123746902740 |
0.510736836358317 |
0.864335399057872 |
0.725284450559544 |
0.085677149279824 |
0.942077809917777 |
0.798407114482674 |
0.163865051774245 |
0.017995767769402 |
0.879516513030751 |
0.736922031145972 |
0.589669372695344 |
0.954449085497507 |
0.811225361568493 |
0.172090128609953 |
0.525153056031630 |
0.386470556904781 |
0.744990266275122 |
0.100015020510189 |
0.460091779222755 |
Can't render this file because it has a wrong number of fields in line 60.

View File

@ -1,161 +1,396 @@
hello
hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello taos> select repeat('hello', 1)
aa repeat('hello', 1) |
g;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddh =====================
gaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc;ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddh hello |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc;ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddgh
6400 taos> select repeat('hello', 20)
50060 repeat('hello', 20) |
北京taos北京taos北京taos北京taos北京taos北京taos =================================
novelnovelnovelnovelnovelnovel hellohellohellohellohellohe... |
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
updateupdateupdateupdateupdateupdate taos> SELECT REPEAT('a', 2)
prisionprisionprisionprisionprisionprision repeat('a', 2) |
novelnovelnovelnovelnovelnovel =================
novelnovelnovelnovelnovelnovel aa |
personpersonpersonpersonpersonperson
novelnovelnovelnovelnovelnovel taos> SELECT CONCAT('g',CONCAT(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
plateplateplateplateplateplate concat('g',concat(';',repeat('a',60), repeat('b',60), repeat('c' |
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 ===================================================================
1 g;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
1
1 taos> SELECT CONCAT('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
1 concat('g',concat_ws(';',repeat('a',60), repeat('b',60), repeat( |
1 ===================================================================
1 gaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
1
1 taos> SELECT CONCAT_WS('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
1 concat_ws('g',concat_ws(';',repeat('a',60), repeat('b',60), repe |
1 ===================================================================
1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;... |
1
1 taos> select length(concat(repeat("a",3200),repeat("a",3200)))
1 length(concat(repeat("a",3200),repeat("a",3200))) |
1 ====================================================
1 6400 |
1
1 taos> select length(replace("aaaaa","a",concat(repeat("a",10000),repeat("a",12))))
1 length(replace("aaaaa","a",concat(repeat("a",10000),repeat("a",1 |
1 ===================================================================
一二三四五六七八九十 50060 |
updateupdate
prisionprisionprision taos> select repeat('北京taos', 6)
novelnovelnovelnovel repeat('北京taos', 6) |
novelnovelnovelnovelnovel =================================
person 北京taos北京taos北京taos北... |
novelnovel
plateplateplate taos> select repeat(nch1, 6) from ts_4893.meters order by ts limit 5
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 repeat(nch1, 6) |
updateupdateupdateupdateupdate =================================
nch1 novelnovelnovelnovelnovelnovel |
nch1nch1 一二三四五六七八九十一二三... |
nch1nch1nch1 updateupdateupdateupdateupd... |
nch1nch1nch1nch1 prisionprisionprisionprisio... |
nch1nch1nch1nch1nch1 novelnovelnovelnovelnovelnovel |
var1
var1var1 taos> select repeat(var1, 6) from ts_4893.meters order by ts limit 5
var1var1var1 repeat(var1, 6) |
var1var1var1var1 =================================
var1var1var1var1var1 novelnovelnovelnovelnovelnovel |
taos personpersonpersonpersonper... |
taostaos novelnovelnovelnovelnovelnovel |
lililililili plateplateplateplateplateplate |
xxx 一二三四五六七八九十一二三... |
lililililili
xxx taos> select position(nch1 in repeat(nch1,6)) from ts_4893.meters order by ts limit 5
lililililili position(nch1 in repeat(nch1,6)) |
taostaostaos ===================================
hahahahahaha 1 |
taostaostaos 1 |
taostaostaos 1 |
hahahahahaha 1 |
lililililili 1 |
xxx
lililililili taos> select position(var1 in repeat(var1,6)) from ts_4893.meters order by ts limit 5
xxx position(var1 in repeat(var1,6)) |
lililililili ===================================
taostaostaos 1 |
hahahahahaha 1 |
taostaostaos 1 |
taostaostaos 1 |
hahahahahaha 1 |
novelnovelnovel
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 taos> select position(nch1 in repeat(var1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5
updateupdateupdate position(nch1 in repeat(var1,6)) |
prisionprisionprision ===================================
novelnovelnovel 1 |
novelnovelnovel 1 |
againagainagain 1 |
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 1 |
novelnovelnovel 1 |
againagainagain
novelnovelnovel taos> select position(var1 in repeat(nch1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 position(var1 in repeat(nch1,6)) |
updateupdateupdate ===================================
prisionprisionprision 1 |
novelnovelnovel 1 |
novelnovelnovel 1 |
againagainagain 1 |
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 1 |
novelnovelnovel
againagainagain taos> select repeat(nch1, id) from ts_4893.meters where id > 0 order by ts limit 5
novelnovelnovel repeat(nch1, id) |
personpersonperson =================================
novelnovelnovel 一二三四五六七八九十 |
plateplateplate updateupdate |
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 prisionprisionprision |
updateupdateupdate novelnovelnovelnovel |
prisionprisionprision novelnovelnovelnovelnovel |
personpersonperson
prisionprisionprision taos> select repeat(var1, id) from ts_4893.meters where id > 0 order by ts limit 5
plateplateplate repeat(var1, id) |
novelnovelnovel ===================
personpersonperson person |
novelnovelnovel novelnovel |
plateplateplate plateplateplate |
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十 一二三四五六... |
updateupdateupdate updateupdateu... |
prisionprisionprision
personpersonperson taos> select repeat('nch1', id) from ts_4893.meters where id > 0 order by ts limit 5
prisionprisionprision repeat('nch1', id) |
plateplateplate =================================
lili nch1 |
x nch1nch1 |
lili nch1nch1nch1 |
x nch1nch1nch1nch1 |
lili nch1nch1nch1nch1nch1 |
taos
haha taos> select repeat('var1', id) from ts_4893.meters where id > 0 order by ts limit 5
taos repeat('var1', id) |
taos =================================
haha var1 |
lili var1var1 |
x var1var1var1 |
lili var1var1var1var1 |
x var1var1var1var1var1 |
lili
taos taos> select repeat('taos', 1)
haha repeat('taos', 1) |
taos ====================
taos taos |
haha
novel taos> select repeat('taos', 2)
一二三四五六七八九十 repeat('taos', 2) |
update ====================
prision taostaos |
novel
novel taos> select repeat(name, 3) from ts_4893.d0 order by ts limit 10
again repeat(name, 3) |
一二三四五六七八九十 =================================
novel lililililili |
again xxx |
novel lililililili |
一二三四五六七八九十 xxx |
update lililililili |
prision taostaostaos |
novel hahahahahaha |
novel taostaostaos |
again taostaostaos |
一二三四五六七八九十 hahahahahaha |
novel
again taos> select repeat(name, 3) from ts_4893.meters order by ts limit 10
repeat(name, 3) |
=================================
lililililili |
xxx |
lililililili |
xxx |
lililililili |
taostaostaos |
hahahahahaha |
taostaostaos |
taostaostaos |
hahahahahaha |
taos> select repeat(nch1, 3) from ts_4893.d0 order by ts limit 10
repeat(nch1, 3) |
=================================
novelnovelnovel |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
novelnovelnovel |
novelnovelnovel |
againagainagain |
一二三四五六七八九十一二三... |
novelnovelnovel |
againagainagain |
taos> select repeat(nch1, 3) from ts_4893.meters order by ts limit 10
repeat(nch1, 3) |
=================================
novelnovelnovel |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
novelnovelnovel |
novelnovelnovel |
againagainagain |
一二三四五六七八九十一二三... |
novelnovelnovel |
againagainagain |
taos> select repeat(var1, 3) from ts_4893.d0 order by ts limit 10
repeat(var1, 3) |
=================================
novelnovelnovel |
personpersonperson |
novelnovelnovel |
plateplateplate |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
personpersonperson |
prisionprisionprision |
plateplateplate |
taos> select repeat(var1, 3) from ts_4893.meters order by ts limit 10
repeat(var1, 3) |
=================================
novelnovelnovel |
personpersonperson |
novelnovelnovel |
plateplateplate |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
personpersonperson |
prisionprisionprision |
plateplateplate |
taos> select repeat(name, groupid) from ts_4893.d0 order by ts limit 10
repeat(name, groupid) |
========================
lili |
x |
lili |
x |
lili |
taos |
haha |
taos |
taos |
haha |
taos> select repeat(name, groupid) from ts_4893.meters order by ts limit 10
repeat(name, groupid) |
========================
lili |
x |
lili |
x |
lili |
taos |
haha |
taos |
taos |
haha |
taos> select repeat(nch1, groupid) from ts_4893.d0 order by ts limit 10
repeat(nch1, groupid) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select repeat(nch1, groupid) from ts_4893.meters order by ts limit 10
repeat(nch1, groupid) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select repeat(null, 3)
repeat(null, 3) |
==================
NULL |
taos> select repeat('taos', null)
repeat('taos', null) |
=======================
NULL |
taos> select repeat('taos', 0)
repeat('taos', 0) |
====================
|
taos> select repeat('', 5)
repeat('', 5) |
================
|
taos> select repeat('A', 0)
repeat('A', 0) |
=================
|
taos> select repeat('A', 10)
repeat('A', 10) |
=================================
AAAAAAAAAA |
taos> select repeat('A B', 5)
repeat('A B', 5) |
============================
A BA BA BA BA B |
taos> select repeat('ABC', 1)
repeat('ABC', 1) |
===================
ABC |
taos> select repeat('Hello', 2)
repeat('Hello', 2) |
=====================
HelloHello |
taos> select repeat('HelloWorld', 2)
repeat('HelloWorld', 2) |
===========================
HelloWorldHelloWorld |
taos> select repeat('123', 5)
repeat('123', 5) |
============================
123123123123123 |
taos> select repeat('12345', 3)
repeat('12345', 3) |
========================
123451234512345 |
taos> select repeat('!@#', 3)
repeat('!@#', 3) |
===================
!@#!@#!@# |
taos> select repeat('你好', 2)
repeat('你好', 2) |
======================
你好你好 |
taos> select repeat('abc', length('abc'))
repeat('abc', length('abc')) |
===============================
abcabcabc |
taos> select repeat(concat('A', 'B', 'C'), 3)
repeat(concat('A', 'B', 'C'), 3) |
===================================
ABCABCABC |
taos> select repeat(upper('abc'), 4)
repeat(upper('abc'), 4) |
==========================
ABCABCABCABC |
taos> select repeat(trim(' Hello '), 3)
repeat(trim(' Hello '), 3) |
=================================
HelloHelloHello |
taos> select name, repeat(name, 3) from ts_4893.meters limit 1
name | repeat(name, 3) |
==================================================================
lili | lililililili |
taos> select name, repeat(substring(name, 1, 5), 2) from ts_4893.meters limit 1
name | repeat(substring(name, 1, 5), 2) |
====================================================================
lili | lililili |
taos> select var1, repeat(var1, 2) from ts_4893.meters limit 1
var1 | repeat(var1, 2) |
==================================================================
novel | novelnovel |
taos> select nch1, repeat(nch1, 4) from ts_4893.meters limit 1
nch1 | repeat(nch1, 4) |
==================================================================
novel | novelnovelnovelnovel |

Can't render this file because it has a wrong number of fields in line 4.

View File

@ -1,396 +0,0 @@
taos> select repeat('hello', 1)
repeat('hello', 1) |
=====================
hello |
taos> select repeat('hello', 20)
repeat('hello', 20) |
=================================
hellohellohellohellohellohe... |
taos> SELECT REPEAT('a', 2)
repeat('a', 2) |
=================
aa |
taos> SELECT CONCAT('g',CONCAT(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
concat('g',concat(';',repeat('a',60), repeat('b',60), repeat('c' |
===================================================================
g;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
taos> SELECT CONCAT('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
concat('g',concat_ws(';',repeat('a',60), repeat('b',60), repeat( |
===================================================================
gaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
taos> SELECT CONCAT_WS('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
concat_ws('g',concat_ws(';',repeat('a',60), repeat('b',60), repe |
===================================================================
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;... |
taos> select length(concat(repeat("a",3200),repeat("a",3200)))
length(concat(repeat("a",3200),repeat("a",3200))) |
====================================================
6400 |
taos> select length(replace("aaaaa","a",concat(repeat("a",10000),repeat("a",12))))
length(replace("aaaaa","a",concat(repeat("a",10000),repeat("a",1 |
===================================================================
50060 |
taos> select repeat('北京taos', 6)
repeat('北京taos', 6) |
=================================
北京taos北京taos北京taos北... |
taos> select repeat(nch1, 6) from ts_4893.meters order by ts limit 5
repeat(nch1, 6) |
=================================
novelnovelnovelnovelnovelnovel |
一二三四五六七八九十一二三... |
updateupdateupdateupdateupd... |
prisionprisionprisionprisio... |
novelnovelnovelnovelnovelnovel |
taos> select repeat(var1, 6) from ts_4893.meters order by ts limit 5
repeat(var1, 6) |
=================================
novelnovelnovelnovelnovelnovel |
personpersonpersonpersonper... |
novelnovelnovelnovelnovelnovel |
plateplateplateplateplateplate |
一二三四五六七八九十一二三... |
taos> select position(nch1 in repeat(nch1,6)) from ts_4893.meters order by ts limit 5
position(nch1 in repeat(nch1,6)) |
===================================
1 |
1 |
1 |
1 |
1 |
taos> select position(var1 in repeat(var1,6)) from ts_4893.meters order by ts limit 5
position(var1 in repeat(var1,6)) |
===================================
1 |
1 |
1 |
1 |
1 |
taos> select position(nch1 in repeat(var1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5
position(nch1 in repeat(var1,6)) |
===================================
1 |
1 |
1 |
1 |
1 |
taos> select position(var1 in repeat(nch1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5
position(var1 in repeat(nch1,6)) |
===================================
1 |
1 |
1 |
1 |
1 |
taos> select repeat(nch1, id) from ts_4893.meters where id > 0 order by ts limit 5
repeat(nch1, id) |
=================================
一二三四五六七八九十 |
updateupdate |
prisionprisionprision |
novelnovelnovelnovel |
novelnovelnovelnovelnovel |
taos> select repeat(var1, id) from ts_4893.meters where id > 0 order by ts limit 5
repeat(var1, id) |
===================
person |
novelnovel |
plateplateplate |
一二三四五六... |
updateupdateu... |
taos> select repeat('nch1', id) from ts_4893.meters where id > 0 order by ts limit 5
repeat('nch1', id) |
=================================
nch1 |
nch1nch1 |
nch1nch1nch1 |
nch1nch1nch1nch1 |
nch1nch1nch1nch1nch1 |
taos> select repeat('var1', id) from ts_4893.meters where id > 0 order by ts limit 5
repeat('var1', id) |
=================================
var1 |
var1var1 |
var1var1var1 |
var1var1var1var1 |
var1var1var1var1var1 |
taos> select repeat('taos', 1)
repeat('taos', 1) |
====================
taos |
taos> select repeat('taos', 2)
repeat('taos', 2) |
====================
taostaos |
taos> select repeat(name, 3) from ts_4893.d0 order by ts limit 10
repeat(name, 3) |
=================================
lililililili |
xxx |
lililililili |
xxx |
lililililili |
taostaostaos |
hahahahahaha |
taostaostaos |
taostaostaos |
hahahahahaha |
taos> select repeat(name, 3) from ts_4893.meters order by ts limit 10
repeat(name, 3) |
=================================
lililililili |
xxx |
lililililili |
xxx |
lililililili |
taostaostaos |
hahahahahaha |
taostaostaos |
taostaostaos |
hahahahahaha |
taos> select repeat(nch1, 3) from ts_4893.d0 order by ts limit 10
repeat(nch1, 3) |
=================================
novelnovelnovel |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
novelnovelnovel |
novelnovelnovel |
againagainagain |
一二三四五六七八九十一二三... |
novelnovelnovel |
againagainagain |
taos> select repeat(nch1, 3) from ts_4893.meters order by ts limit 10
repeat(nch1, 3) |
=================================
novelnovelnovel |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
novelnovelnovel |
novelnovelnovel |
againagainagain |
一二三四五六七八九十一二三... |
novelnovelnovel |
againagainagain |
taos> select repeat(var1, 3) from ts_4893.d0 order by ts limit 10
repeat(var1, 3) |
=================================
novelnovelnovel |
personpersonperson |
novelnovelnovel |
plateplateplate |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
personpersonperson |
prisionprisionprision |
plateplateplate |
taos> select repeat(var1, 3) from ts_4893.meters order by ts limit 10
repeat(var1, 3) |
=================================
novelnovelnovel |
personpersonperson |
novelnovelnovel |
plateplateplate |
一二三四五六七八九十一二三... |
updateupdateupdate |
prisionprisionprision |
personpersonperson |
prisionprisionprision |
plateplateplate |
taos> select repeat(name, groupid) from ts_4893.d0 order by ts limit 10
repeat(name, groupid) |
========================
lili |
x |
lili |
x |
lili |
taos |
haha |
taos |
taos |
haha |
taos> select repeat(name, groupid) from ts_4893.meters order by ts limit 10
repeat(name, groupid) |
========================
lili |
x |
lili |
x |
lili |
taos |
haha |
taos |
taos |
haha |
taos> select repeat(nch1, groupid) from ts_4893.d0 order by ts limit 10
repeat(nch1, groupid) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select repeat(nch1, groupid) from ts_4893.meters order by ts limit 10
repeat(nch1, groupid) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select repeat(null, 3)
repeat(null, 3) |
==================
NULL |
taos> select repeat('taos', null)
repeat('taos', null) |
=======================
NULL |
taos> select repeat('taos', 0)
repeat('taos', 0) |
====================
|
taos> select repeat('', 5)
repeat('', 5) |
================
|
taos> select repeat('A', 0)
repeat('A', 0) |
=================
|
taos> select repeat('A', 10)
repeat('A', 10) |
=================================
AAAAAAAAAA |
taos> select repeat('A B', 5)
repeat('A B', 5) |
============================
A BA BA BA BA B |
taos> select repeat('ABC', 1)
repeat('ABC', 1) |
===================
ABC |
taos> select repeat('Hello', 2)
repeat('Hello', 2) |
=====================
HelloHello |
taos> select repeat('HelloWorld', 2)
repeat('HelloWorld', 2) |
===========================
HelloWorldHelloWorld |
taos> select repeat('123', 5)
repeat('123', 5) |
============================
123123123123123 |
taos> select repeat('12345', 3)
repeat('12345', 3) |
========================
123451234512345 |
taos> select repeat('!@#', 3)
repeat('!@#', 3) |
===================
!@#!@#!@# |
taos> select repeat('你好', 2)
repeat('你好', 2) |
======================
你好你好 |
taos> select repeat('abc', length('abc'))
repeat('abc', length('abc')) |
===============================
abcabcabc |
taos> select repeat(concat('A', 'B', 'C'), 3)
repeat(concat('A', 'B', 'C'), 3) |
===================================
ABCABCABC |
taos> select repeat(upper('abc'), 4)
repeat(upper('abc'), 4) |
==========================
ABCABCABCABC |
taos> select repeat(trim(' Hello '), 3)
repeat(trim(' Hello '), 3) |
=================================
HelloHelloHello |
taos> select name, repeat(name, 3) from ts_4893.meters limit 1
name | repeat(name, 3) |
==================================================================
lili | lililililili |
taos> select name, repeat(substring(name, 1, 5), 2) from ts_4893.meters limit 1
name | repeat(substring(name, 1, 5), 2) |
====================================================================
lili | lililili |
taos> select var1, repeat(var1, 2) from ts_4893.meters limit 1
var1 | repeat(var1, 2) |
==================================================================
novel | novelnovel |
taos> select nch1, repeat(nch1, 4) from ts_4893.meters limit 1
nch1 | repeat(nch1, 4) |
==================================================================
novel | novelnovelnovelnovel |
Can't render this file because it has a wrong number of fields in line 4.

File diff suppressed because it is too large Load Diff

View File

@ -1,979 +0,0 @@
taos> select replace('aaaa','a','b')
replace('aaaa','a','b') |
==========================
bbbb |
taos> select replace('aaaa','aa','b')
replace('aaaa','aa','b') |
===========================
bb |
taos> select replace('aaaa','a','bb')
replace('aaaa','a','bb') |
===========================
bbbbbbbb |
taos> select replace('aaaa','','b')
replace('aaaa','','b') |
=========================
aaaa |
taos> select replace('bbbb','a','c')
replace('bbbb','a','c') |
==========================
bbbb |
taos> select replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper('false'),' ','test'),'FALSE','REAL')
replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper( |
===================================================================
this is a REAL test |
taos> select replace('北京涛思','北京', '')
replace('北京涛思','北京', '') |
=======================================
涛思 |
taos> select replace('北京涛思','涛思', '')
replace('北京涛思','涛思', '') |
=======================================
北京 |
taos> select replace('北京涛思.com','思.', '北京')
replace('北京涛思.com','思.', '北京') |
===============================================
北京涛北京com |
taos> select replace('北京涛思.com','北com', '北京涛')
replace('北京涛思.com','北com', '北京涛') |
====================================================
北京涛思.com |
taos> select replace('北京涛思', char(ascii('北')), 'wrongans')
replace('北京涛思', char(ascii('北')), 'wrongans') |
==========================================================
北京涛思 |
taos> select replace(nch1, 'a', 'b') from ts_4893.meters order by ts limit 5
replace(nch1, 'a', 'b') |
=================================
novel |
一二三四五六七八九十 |
updbte |
prision |
novel |
taos> select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
replace(nch1, 'a', 'b') |
=================================
updbte |
bgbin |
bgbin |
plbte |
bbc一二三bbc一二三bbc |
taos> select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
replace(nch1, 'a', 'b') |
=================================
novel |
一二三四五六七八九十 |
prision |
novel |
novel |
taos> select replace(nch1, 'a', '啊') from ts_4893.meters order by ts limit 5
replace(nch1, 'a', '啊') |
=================================
novel |
一二三四五六七八九十 |
upd啊te |
prision |
novel |
taos> select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
replace(nch1, 'a', '啊') |
=================================
upd啊te |
啊g啊in |
啊g啊in |
pl啊te |
啊bc一二三啊bc一二三啊bc |
taos> select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
replace(nch1, 'a', '啊') |
=================================
novel |
一二三四五六七八九十 |
prision |
novel |
novel |
taos> select replace(nch1, '一', '壹') from ts_4893.meters order by ts limit 5
replace(nch1, '一', '壹') |
=================================
novel |
壹二三四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
replace(nch1, '一', '壹') |
=================================
壹二三四五六七八九十 |
壹二三四五六七八九十 |
abc壹二三abc壹二三abc |
壹壹壹壹壹||壹壹壹壹 |
壹二三123321三二壹 |
taos> select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
replace(nch1, '一', '壹') |
=================================
novel |
update |
prision |
novel |
novel |
taos> select replace(nch1, '一', '1') from ts_4893.meters order by ts limit 5
replace(nch1, '一', '1') |
=================================
novel |
1二三四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
replace(nch1, '一', '1') |
=================================
1二三四五六七八九十 |
1二三四五六七八九十 |
abc1二三abc1二三abc |
11111||1111 |
1二三123321三二1 |
taos> select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
replace(nch1, '一', '1') |
=================================
novel |
update |
prision |
novel |
novel |
taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
replace(nch1, nch2, 'nch2') |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novnch2l |
taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
replace(nch1, nch2, 'nch2') |
=================================
novnch2l |
anch2c一二三anch2c一二三anch2c |
一二三anch2c |
一二三nch2五六七八九十 |
pnch2rson |
taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
replace(nch1, nch2, 'nch2') |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, var2, 'var2') from ts_4893.meters order by ts limit 5
replace(nch1, var2, 'var2') |
=================================
novvar2l |
一二三四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
replace(nch1, var2, 'var2') |
=================================
novvar2l |
novvar2l |
var2abc |
var2123321三二一 |
abvar2一二三abvar2一二三abvar2 |
taos> select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
replace(nch1, var2, 'var2') |
=================================
一二三四五六七八九十 |
update |
prision |
novel |
novel |
taos> select replace(nch1, '三', nch2) from ts_4893.meters order by ts limit 5
replace(nch1, '三', nch2) |
=================================
novel |
一二f四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
replace(nch1, '三', nch2) |
=================================
一二f四五六七八九十 |
一二d四五六七八九十 |
abc一二babc一二babc |
一二三a123321三a二一 |
一二babc |
taos> select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
replace(nch1, '三', nch2) |
=================================
novel |
update |
prision |
novel |
novel |
taos> select replace(nch1, '三', var2) from ts_4893.meters order by ts limit 5
replace(nch1, '三', var2) |
=================================
novel |
一二三a四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
replace(nch1, '三', var2) |
=================================
一二三a四五六七八九十 |
一二b四五六七八九十 |
abc一二fabc一二fabc |
一二三a123321三a二一 |
一二一二三abc |
taos> select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
replace(nch1, '三', var2) |
=================================
novel |
update |
prision |
novel |
novel |
taos> select replace(nch1, nch2, var2) from ts_4893.meters order by ts limit 5
replace(nch1, nch2, var2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novbl |
taos> select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
replace(nch1, nch2, var2) |
=================================
novbl |
afc一二三afc一二三afc |
一二三a一二三c |
一二三三a五六七八九十 |
pdrson |
taos> select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
replace(nch1, nch2, var2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, var2, nch2) from ts_4893.meters order by ts limit 5
replace(nch1, var2, nch2) |
=================================
nov四l |
一二三四五六七八九十 |
update |
prision |
novel |
taos> select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
replace(nch1, var2, nch2) |
=================================
nov四l |
novcl |
babc |
三a123321三二一 |
abf一二三abf一二三abf |
taos> select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
replace(nch1, var2, nch2) |
=================================
一二三四五六七八九十 |
update |
prision |
novel |
novel |
taos> select replace(var1, 'a', 'b') from ts_4893.meters order by ts limit 5
replace(var1, 'a', 'b') |
=================================
novel |
person |
novel |
plbte |
一二三四五六七八九十 |
taos> select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
replace(var1, 'a', 'b') |
=================================
plbte |
updbte |
plbte |
updbte |
一二三bbc |
taos> select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
replace(var1, 'a', 'b') |
=================================
novel |
person |
novel |
一二三四五六七八九十 |
prision |
taos> select replace(var1, 'a', '啊') from ts_4893.meters order by ts limit 5
replace(var1, 'a', '啊') |
=================================
novel |
person |
novel |
pl啊te |
一二三四五六七八九十 |
taos> select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
replace(var1, 'a', '啊') |
=================================
pl啊te |
upd啊te |
pl啊te |
upd啊te |
一二三啊bc |
taos> select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
replace(var1, 'a', '啊') |
=================================
novel |
person |
novel |
一二三四五六七八九十 |
prision |
taos> select replace(var1, '一', '壹') from ts_4893.meters order by ts limit 5
replace(var1, '一', '壹') |
=================================
novel |
person |
novel |
plate |
壹二三四五六七八九十 |
taos> select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
replace(var1, '一', '壹') |
=================================
壹二三四五六七八九十 |
壹二三abc |
abc壹二三abc壹二三abc |
壹二三123321三二壹 |
壹壹壹壹壹||壹壹壹壹 |
taos> select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
replace(var1, '一', '壹') |
=================================
novel |
person |
novel |
plate |
update |
taos> select replace(var1, '一', '1') from ts_4893.meters order by ts limit 5
replace(var1, '一', '1') |
=================================
novel |
person |
novel |
plate |
1二三四五六七八九十 |
taos> select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
replace(var1, '一', '1') |
=================================
1二三四五六七八九十 |
1二三abc |
abc1二三abc1二三abc |
1二三123321三二1 |
11111||1111 |
taos> select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
replace(var1, '一', '1') |
=================================
novel |
person |
novel |
plate |
update |
taos> select replace(var1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
replace(var1, nch2, 'nch2') |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
taos> select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
replace(var1, nch2, 'nch2') |
=================================
一二nch2bc |
anch2c一二三anch2c一二三anch2c |
nch2bc一二三nch2bc一二三nch2bc |
novnch2l |
upnch2ate |
taos> select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
replace(var1, nch2, 'nch2') |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
taos> select replace(var1, var2, 'var2') from ts_4893.meters order by ts limit 5
replace(var1, var2, 'var2') |
=================================
novvar2l |
person |
novel |
platvar2 |
一二三四五六七八九十 |
taos> select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
replace(var1, var2, 'var2') |
=================================
novvar2l |
platvar2 |
一二三var2bc |
var2123321三二一 |
abvar2一二三abvar2一二三abvar2 |
taos> select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
replace(var1, var2, 'var2') |
=================================
person |
novel |
一二三四五六七八九十 |
update |
prision |
taos> select replace(var1, '三', nch2) from ts_4893.meters order by ts limit 5
replace(var1, '三', nch2) |
=================================
novel |
person |
novel |
plate |
一二e四五六七八九十 |
taos> select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
replace(var1, '三', nch2) |
=================================
一二e四五六七八九十 |
一二三aabc |
abc一二babc一二babc |
一二三a123321三a二一 |
一二c四五六七八九十 |
taos> select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
replace(var1, '三', nch2) |
=================================
novel |
person |
novel |
plate |
update |
taos> select replace(var1, '三', var2) from ts_4893.meters order by ts limit 5
replace(var1, '三', var2) |
=================================
novel |
person |
novel |
plate |
一二b四五六七八九十 |
taos> select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
replace(var1, '三', var2) |
=================================
一二b四五六七八九十 |
一二aabc |
abc一二fabc一二fabc |
一二四123321四二一 |
一二b四五六七八九十 |
taos> select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
replace(var1, '三', var2) |
=================================
novel |
person |
novel |
plate |
update |
taos> select replace(var1, nch2, var2) from ts_4893.meters order by ts limit 5
replace(var1, nch2, var2) |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
taos> select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
replace(var1, nch2, var2) |
=================================
一二abc |
afc一二三afc一二三afc |
四bc一二三四bc一二三四bc |
novdl |
up一二三ate |
taos> select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
replace(var1, nch2, var2) |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
taos> select replace(var1, var2, nch2) from ts_4893.meters order by ts limit 5
replace(var1, var2, nch2) |
=================================
nov四l |
person |
novel |
plat一 |
一二三四五六七八九十 |
taos> select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
replace(var1, var2, nch2) |
=================================
nov四l |
plat一 |
一二三三abc |
b123321三二一 |
abf一二三abf一二三abf |
taos> select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
replace(var1, var2, nch2) |
=================================
person |
novel |
一二三四五六七八九十 |
update |
prision |
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
===================================================================
一二三nch2五六七abcdefghijk213124123 |
一二三四五六七abcdench2ghijk213124123 |
一二三四五六七abnch2defghijk213124123 |
nch2二三四五六七abcdefghijk213124123 |
一二三四五六七abcdnch2fghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
===================================================================
一二三nch2五六七abcdefghijk213124123 |
一二三四五六七abcdench2ghijk213124123 |
一二三四五六七abnch2defghijk213124123 |
nch2二三四五六七abcdefghijk213124123 |
一二三四五六七abcdnch2fghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
===================================================================
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
===================================================================
一二三e五六七abcdefghijk213124123 |
一二三四五六七abcde三aghijk213124123 |
一二三四五六七ab四defghijk213124123 |
e二三四五六七abcdefghijk213124123 |
一二三四五六七abcdbfghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
===================================================================
一二三e五六七abcdefghijk213124123 |
一二三四五六七abcde三aghijk213124123 |
一二三四五六七ab四defghijk213124123 |
e二三四五六七abcdefghijk213124123 |
一二三四五六七abcdbfghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
===================================================================
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
===================================================================
一二三四五六七abcdvar2fghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三var2五六七abcdefghijk213124123 |
一二三四五六七abcdvar2fghijk213124123 |
一二三四五六七avar2cdefghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
===================================================================
一二三四五六七abcdvar2fghijk213124123 |
一二三var2五六七abcdefghijk213124123 |
一二三四五六七abcdvar2fghijk213124123 |
一二三四五六七avar2cdefghijk213124123 |
一二三四五六七abcdefvar2hijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
===================================================================
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
===================================================================
一二三四五六七abcd四fghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三c五六七abcdefghijk213124123 |
一二三四五六七abcd一fghijk213124123 |
一二三四五六七aecdefghijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
===================================================================
一二三四五六七abcd四fghijk213124123 |
一二三c五六七abcdefghijk213124123 |
一二三四五六七abcd一fghijk213124123 |
一二三四五六七aecdefghijk213124123 |
一二三四五六七abcdef一二三hijk213124123 |
taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
===================================================================
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
一二三四五六七abcdefghijk213124123 |
taos> select replace('aabbccdd','aa', 'ee')
replace('aabbccdd','aa', 'ee') |
=================================
eebbccdd |
taos> select replace('aabbccdd','AA', 'ee')
replace('aabbccdd','AA', 'ee') |
=================================
aabbccdd |
taos> select replace('北京','北' , '南')
replace('北京','北' , '南') |
==================================
南京 |
taos> select replace('北京','京' , '南')
replace('北京','京' , '南') |
==================================
北南 |
taos> select replace('北京taos','北' , '南')
replace('北京taos','北' , '南') |
======================================
南京taos |
taos> select replace(nch1, nch2, 't') from ts_4893.d0 order by ts limit 10
replace(nch1, nch2, 't') |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novtl |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select replace(nch1, nch2, 't') from ts_4893.meters order by ts limit 10
replace(nch1, nch2, 't') |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novtl |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select replace(nch1, var2, 't') from ts_4893.d0 order by ts limit 10
replace(nch1, var2, 't') |
=================================
novtl |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novtl |
again |
taos> select replace(nch1, var2, 't') from ts_4893.meters order by ts limit 10
replace(nch1, var2, 't') |
=================================
novtl |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novtl |
again |
taos> select replace(var1, nch2, 't') from ts_4893.d0 order by ts limit 10
replace(var1, nch2, 't') |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select replace(var1, nch2, 't') from ts_4893.meters order by ts limit 10
replace(var1, nch2, 't') |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select replace(var1, var2, 't') from ts_4893.d0 order by ts limit 10
replace(var1, var2, 't') |
=================================
novtl |
person |
novel |
platt |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select replace(var1, var2, 't') from ts_4893.meters order by ts limit 10
replace(var1, var2, 't') |
=================================
novtl |
person |
novel |
platt |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select replace(nch1, nch2, var1) from ts_4893.d0 order by ts limit 10
replace(nch1, nch2, var1) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
nov一二三四五六七八九十l |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select replace(nch1, nch2, var1) from ts_4893.meters order by ts limit 10
replace(nch1, nch2, var1) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
nov一二三四五六七八九十l |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select replace(null, 'aa', 'ee')
replace(null, 'aa', 'ee') |
============================
NULL |
taos> select replace(null, 'A', 'B')
replace(null, 'A', 'B') |
==========================
NULL |
taos> select replace('', '', 'B')
replace('', '', 'B') |
=======================
|
taos> select replace('', 'A', 'B')
replace('', 'A', 'B') |
========================
|
taos> select replace('A', 'A', '')
replace('A', 'A', '') |
========================
|
taos> select replace('aabbccdd', null, 'ee')
replace('aabbccdd', null, 'ee') |
==================================
NULL |
taos> select replace('Hello', 'Z', 'X')
replace('Hello', 'Z', 'X') |
=============================
Hello |
taos> select replace('Hello World', ' ', '_')
replace('Hello World', ' ', '_') |
===================================
Hello_World |
taos> select replace('Hello World', 'World', 'MySQL')
replace('Hello World', 'World', 'MySQL') |
===========================================
Hello MySQL |
taos> select replace('12345', '5', 'five')
replace('12345', '5', 'five') |
================================
1234five |
taos> select replace('中国', '中', '国')
replace('中国', '中', '国') |
==================================
国国 |
taos> select replace('é', 'e', 'a')
replace('é', 'e', 'a') |
==========================
é |
taos> select replace('!@#', '@', '#')
replace('!@#', '@', '#') |
===========================
!## |
taos> select replace('123456', '7', 'eight')
replace('123456', '7', 'eight') |
==================================
123456 |
taos> select replace(concat('A', 'B', 'C'), 'B', 'Z')
replace(concat('A', 'B', 'C'), 'B', 'Z') |
===========================================
AZC |
taos> select replace(upper('abc'), 'A', 'X')
replace(upper('abc'), 'A', 'X') |
==================================
XBC |
taos> select replace(trim(' Hello '), 'l', 'L')
replace(trim(' Hello '), 'l', 'L') |
=======================================
HeLLo |
taos> select replace(lower('HELLO'), 'h', 'H')
replace(lower('HELLO'), 'h', 'H') |
====================================
Hello |
taos> select name, replace(substring(name, 1, 5), 'e', 'o') from ts_4893.meters limit 1
name | replace(substring(name, 1, 5), 'e', 'o') |
============================================================================
lili | lili |
taos> select name, replace(name, 'a', 'o') from ts_4893.meters limit 1
name | replace(name, 'a', 'o') |
==================================================================
lili | lili |
taos> select var1, replace(var1, '1', 'one') from ts_4893.meters limit 1
var1 | replace(var1, '1', 'one') |
==================================================================
novel | novel |
taos> select nch1, replace(nch1, 'n', 'm') from ts_4893.meters limit 1
nch1 | replace(nch1, 'n', 'm') |
==================================================================
novel | movel |
1 taos> select replace('aaaa','a','b')
2 replace('aaaa','a','b') |
3 ==========================
4 bbbb |
5 taos> select replace('aaaa','aa','b')
6 replace('aaaa','aa','b') |
7 ===========================
8 bb |
9 taos> select replace('aaaa','a','bb')
10 replace('aaaa','a','bb') |
11 ===========================
12 bbbbbbbb |
13 taos> select replace('aaaa','','b')
14 replace('aaaa','','b') |
15 =========================
16 aaaa |
17 taos> select replace('bbbb','a','c')
18 replace('bbbb','a','c') |
19 ==========================
20 bbbb |
21 taos> select replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper('false'),' ','test'),'FALSE','REAL')
22 replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper( |
23 ===================================================================
24 this is a REAL test |
25 taos> select replace('北京涛思','北京', '')
26 replace('北京涛思','北京', '') |
27 =======================================
28 涛思 |
29 taos> select replace('北京涛思','涛思', '')
30 replace('北京涛思','涛思', '') |
31 =======================================
32 北京 |
33 taos> select replace('北京涛思.com','思.', '北京')
34 replace('北京涛思.com','思.', '北京') |
35 ===============================================
36 北京涛北京com |
37 taos> select replace('北京涛思.com','北com', '北京涛')
38 replace('北京涛思.com','北com', '北京涛') |
39 ====================================================
40 北京涛思.com |
41 taos> select replace('北京涛思', char(ascii('北')), 'wrongans')
42 replace('北京涛思', char(ascii('北')), 'wrongans') |
43 ==========================================================
44 北京涛思 |
45 taos> select replace(nch1, 'a', 'b') from ts_4893.meters order by ts limit 5
46 replace(nch1, 'a', 'b') |
47 =================================
48 novel |
49 一二三四五六七八九十 |
50 updbte |
51 prision |
52 novel |
53 taos> select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
54 replace(nch1, 'a', 'b') |
55 =================================
56 updbte |
57 bgbin |
58 bgbin |
59 plbte |
60 bbc一二三bbc一二三bbc |
61 taos> select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
62 replace(nch1, 'a', 'b') |
63 =================================
64 novel |
65 一二三四五六七八九十 |
66 prision |
67 novel |
68 novel |
69 taos> select replace(nch1, 'a', '啊') from ts_4893.meters order by ts limit 5
70 replace(nch1, 'a', '啊') |
71 =================================
72 novel |
73 一二三四五六七八九十 |
74 upd啊te |
75 prision |
76 novel |
77 taos> select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
78 replace(nch1, 'a', '啊') |
79 =================================
80 upd啊te |
81 啊g啊in |
82 啊g啊in |
83 pl啊te |
84 啊bc一二三啊bc一二三啊bc |
85 taos> select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
86 replace(nch1, 'a', '啊') |
87 =================================
88 novel |
89 一二三四五六七八九十 |
90 prision |
91 novel |
92 novel |
93 taos> select replace(nch1, '一', '壹') from ts_4893.meters order by ts limit 5
94 replace(nch1, '一', '壹') |
95 =================================
96 novel |
97 壹二三四五六七八九十 |
98 update |
99 prision |
100 novel |
101 taos> select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
102 replace(nch1, '一', '壹') |
103 =================================
104 壹二三四五六七八九十 |
105 壹二三四五六七八九十 |
106 abc壹二三abc壹二三abc |
107 壹壹壹壹壹||壹壹壹壹 |
108 壹二三123321三二壹 |
109 taos> select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
110 replace(nch1, '一', '壹') |
111 =================================
112 novel |
113 update |
114 prision |
115 novel |
116 novel |
117 taos> select replace(nch1, '一', '1') from ts_4893.meters order by ts limit 5
118 replace(nch1, '一', '1') |
119 =================================
120 novel |
121 1二三四五六七八九十 |
122 update |
123 prision |
124 novel |
125 taos> select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
126 replace(nch1, '一', '1') |
127 =================================
128 1二三四五六七八九十 |
129 1二三四五六七八九十 |
130 abc1二三abc1二三abc |
131 11111||1111 |
132 1二三123321三二1 |
133 taos> select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
134 replace(nch1, '一', '1') |
135 =================================
136 novel |
137 update |
138 prision |
139 novel |
140 novel |
141 taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
142 replace(nch1, nch2, 'nch2') |
143 =================================
144 novel |
145 一二三四五六七八九十 |
146 update |
147 prision |
148 novnch2l |
149 taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
150 replace(nch1, nch2, 'nch2') |
151 =================================
152 novnch2l |
153 anch2c一二三anch2c一二三anch2c |
154 一二三anch2c |
155 一二三nch2五六七八九十 |
156 pnch2rson |
157 taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
158 replace(nch1, nch2, 'nch2') |
159 =================================
160 novel |
161 一二三四五六七八九十 |
162 update |
163 prision |
164 novel |
165 taos> select replace(nch1, var2, 'var2') from ts_4893.meters order by ts limit 5
166 replace(nch1, var2, 'var2') |
167 =================================
168 novvar2l |
169 一二三四五六七八九十 |
170 update |
171 prision |
172 novel |
173 taos> select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
174 replace(nch1, var2, 'var2') |
175 =================================
176 novvar2l |
177 novvar2l |
178 var2abc |
179 var2123321三二一 |
180 abvar2一二三abvar2一二三abvar2 |
181 taos> select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
182 replace(nch1, var2, 'var2') |
183 =================================
184 一二三四五六七八九十 |
185 update |
186 prision |
187 novel |
188 novel |
189 taos> select replace(nch1, '三', nch2) from ts_4893.meters order by ts limit 5
190 replace(nch1, '三', nch2) |
191 =================================
192 novel |
193 一二f四五六七八九十 |
194 update |
195 prision |
196 novel |
197 taos> select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
198 replace(nch1, '三', nch2) |
199 =================================
200 一二f四五六七八九十 |
201 一二d四五六七八九十 |
202 abc一二babc一二babc |
203 一二三a123321三a二一 |
204 一二babc |
205 taos> select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
206 replace(nch1, '三', nch2) |
207 =================================
208 novel |
209 update |
210 prision |
211 novel |
212 novel |
213 taos> select replace(nch1, '三', var2) from ts_4893.meters order by ts limit 5
214 replace(nch1, '三', var2) |
215 =================================
216 novel |
217 一二三a四五六七八九十 |
218 update |
219 prision |
220 novel |
221 taos> select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
222 replace(nch1, '三', var2) |
223 =================================
224 一二三a四五六七八九十 |
225 一二b四五六七八九十 |
226 abc一二fabc一二fabc |
227 一二三a123321三a二一 |
228 一二一二三abc |
229 taos> select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
230 replace(nch1, '三', var2) |
231 =================================
232 novel |
233 update |
234 prision |
235 novel |
236 novel |
237 taos> select replace(nch1, nch2, var2) from ts_4893.meters order by ts limit 5
238 replace(nch1, nch2, var2) |
239 =================================
240 novel |
241 一二三四五六七八九十 |
242 update |
243 prision |
244 novbl |
245 taos> select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
246 replace(nch1, nch2, var2) |
247 =================================
248 novbl |
249 afc一二三afc一二三afc |
250 一二三a一二三c |
251 一二三三a五六七八九十 |
252 pdrson |
253 taos> select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
254 replace(nch1, nch2, var2) |
255 =================================
256 novel |
257 一二三四五六七八九十 |
258 update |
259 prision |
260 novel |
261 taos> select replace(nch1, var2, nch2) from ts_4893.meters order by ts limit 5
262 replace(nch1, var2, nch2) |
263 =================================
264 nov四l |
265 一二三四五六七八九十 |
266 update |
267 prision |
268 novel |
269 taos> select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
270 replace(nch1, var2, nch2) |
271 =================================
272 nov四l |
273 novcl |
274 babc |
275 三a123321三二一 |
276 abf一二三abf一二三abf |
277 taos> select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
278 replace(nch1, var2, nch2) |
279 =================================
280 一二三四五六七八九十 |
281 update |
282 prision |
283 novel |
284 novel |
285 taos> select replace(var1, 'a', 'b') from ts_4893.meters order by ts limit 5
286 replace(var1, 'a', 'b') |
287 =================================
288 novel |
289 person |
290 novel |
291 plbte |
292 一二三四五六七八九十 |
293 taos> select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
294 replace(var1, 'a', 'b') |
295 =================================
296 plbte |
297 updbte |
298 plbte |
299 updbte |
300 一二三bbc |
301 taos> select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
302 replace(var1, 'a', 'b') |
303 =================================
304 novel |
305 person |
306 novel |
307 一二三四五六七八九十 |
308 prision |
309 taos> select replace(var1, 'a', '啊') from ts_4893.meters order by ts limit 5
310 replace(var1, 'a', '啊') |
311 =================================
312 novel |
313 person |
314 novel |
315 pl啊te |
316 一二三四五六七八九十 |
317 taos> select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
318 replace(var1, 'a', '啊') |
319 =================================
320 pl啊te |
321 upd啊te |
322 pl啊te |
323 upd啊te |
324 一二三啊bc |
325 taos> select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
326 replace(var1, 'a', '啊') |
327 =================================
328 novel |
329 person |
330 novel |
331 一二三四五六七八九十 |
332 prision |
333 taos> select replace(var1, '一', '壹') from ts_4893.meters order by ts limit 5
334 replace(var1, '一', '壹') |
335 =================================
336 novel |
337 person |
338 novel |
339 plate |
340 壹二三四五六七八九十 |
341 taos> select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
342 replace(var1, '一', '壹') |
343 =================================
344 壹二三四五六七八九十 |
345 壹二三abc |
346 abc壹二三abc壹二三abc |
347 壹二三123321三二壹 |
348 壹壹壹壹壹||壹壹壹壹 |
349 taos> select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
350 replace(var1, '一', '壹') |
351 =================================
352 novel |
353 person |
354 novel |
355 plate |
356 update |
357 taos> select replace(var1, '一', '1') from ts_4893.meters order by ts limit 5
358 replace(var1, '一', '1') |
359 =================================
360 novel |
361 person |
362 novel |
363 plate |
364 1二三四五六七八九十 |
365 taos> select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
366 replace(var1, '一', '1') |
367 =================================
368 1二三四五六七八九十 |
369 1二三abc |
370 abc1二三abc1二三abc |
371 1二三123321三二1 |
372 11111||1111 |
373 taos> select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
374 replace(var1, '一', '1') |
375 =================================
376 novel |
377 person |
378 novel |
379 plate |
380 update |
381 taos> select replace(var1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
382 replace(var1, nch2, 'nch2') |
383 =================================
384 novel |
385 person |
386 novel |
387 plate |
388 一二三四五六七八九十 |
389 taos> select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
390 replace(var1, nch2, 'nch2') |
391 =================================
392 一二nch2bc |
393 anch2c一二三anch2c一二三anch2c |
394 nch2bc一二三nch2bc一二三nch2bc |
395 novnch2l |
396 upnch2ate |
397 taos> select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
398 replace(var1, nch2, 'nch2') |
399 =================================
400 novel |
401 person |
402 novel |
403 plate |
404 一二三四五六七八九十 |
405 taos> select replace(var1, var2, 'var2') from ts_4893.meters order by ts limit 5
406 replace(var1, var2, 'var2') |
407 =================================
408 novvar2l |
409 person |
410 novel |
411 platvar2 |
412 一二三四五六七八九十 |
413 taos> select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
414 replace(var1, var2, 'var2') |
415 =================================
416 novvar2l |
417 platvar2 |
418 一二三var2bc |
419 var2123321三二一 |
420 abvar2一二三abvar2一二三abvar2 |
421 taos> select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
422 replace(var1, var2, 'var2') |
423 =================================
424 person |
425 novel |
426 一二三四五六七八九十 |
427 update |
428 prision |
429 taos> select replace(var1, '三', nch2) from ts_4893.meters order by ts limit 5
430 replace(var1, '三', nch2) |
431 =================================
432 novel |
433 person |
434 novel |
435 plate |
436 一二e四五六七八九十 |
437 taos> select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
438 replace(var1, '三', nch2) |
439 =================================
440 一二e四五六七八九十 |
441 一二三aabc |
442 abc一二babc一二babc |
443 一二三a123321三a二一 |
444 一二c四五六七八九十 |
445 taos> select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
446 replace(var1, '三', nch2) |
447 =================================
448 novel |
449 person |
450 novel |
451 plate |
452 update |
453 taos> select replace(var1, '三', var2) from ts_4893.meters order by ts limit 5
454 replace(var1, '三', var2) |
455 =================================
456 novel |
457 person |
458 novel |
459 plate |
460 一二b四五六七八九十 |
461 taos> select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
462 replace(var1, '三', var2) |
463 =================================
464 一二b四五六七八九十 |
465 一二aabc |
466 abc一二fabc一二fabc |
467 一二四123321四二一 |
468 一二b四五六七八九十 |
469 taos> select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
470 replace(var1, '三', var2) |
471 =================================
472 novel |
473 person |
474 novel |
475 plate |
476 update |
477 taos> select replace(var1, nch2, var2) from ts_4893.meters order by ts limit 5
478 replace(var1, nch2, var2) |
479 =================================
480 novel |
481 person |
482 novel |
483 plate |
484 一二三四五六七八九十 |
485 taos> select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
486 replace(var1, nch2, var2) |
487 =================================
488 一二abc |
489 afc一二三afc一二三afc |
490 四bc一二三四bc一二三四bc |
491 novdl |
492 up一二三ate |
493 taos> select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
494 replace(var1, nch2, var2) |
495 =================================
496 novel |
497 person |
498 novel |
499 plate |
500 一二三四五六七八九十 |
501 taos> select replace(var1, var2, nch2) from ts_4893.meters order by ts limit 5
502 replace(var1, var2, nch2) |
503 =================================
504 nov四l |
505 person |
506 novel |
507 plat一 |
508 一二三四五六七八九十 |
509 taos> select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
510 replace(var1, var2, nch2) |
511 =================================
512 nov四l |
513 plat一 |
514 一二三三abc |
515 b123321三二一 |
516 abf一二三abf一二三abf |
517 taos> select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
518 replace(var1, var2, nch2) |
519 =================================
520 person |
521 novel |
522 一二三四五六七八九十 |
523 update |
524 prision |
525 taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters order by ts limit 5
526 replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
527 ===================================================================
528 一二三nch2五六七abcdefghijk213124123 |
529 一二三四五六七abcdench2ghijk213124123 |
530 一二三四五六七abnch2defghijk213124123 |
531 nch2二三四五六七abcdefghijk213124123 |
532 一二三四五六七abcdnch2fghijk213124123 |
533 taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
534 replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
535 ===================================================================
536 一二三nch2五六七abcdefghijk213124123 |
537 一二三四五六七abcdench2ghijk213124123 |
538 一二三四五六七abnch2defghijk213124123 |
539 nch2二三四五六七abcdefghijk213124123 |
540 一二三四五六七abcdnch2fghijk213124123 |
541 taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
542 replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
543 ===================================================================
544 一二三四五六七abcdefghijk213124123 |
545 一二三四五六七abcdefghijk213124123 |
546 一二三四五六七abcdefghijk213124123 |
547 一二三四五六七abcdefghijk213124123 |
548 一二三四五六七abcdefghijk213124123 |
549 taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters order by ts limit 5
550 replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
551 ===================================================================
552 一二三e五六七abcdefghijk213124123 |
553 一二三四五六七abcde三aghijk213124123 |
554 一二三四五六七ab四defghijk213124123 |
555 e二三四五六七abcdefghijk213124123 |
556 一二三四五六七abcdbfghijk213124123 |
557 taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
558 replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
559 ===================================================================
560 一二三e五六七abcdefghijk213124123 |
561 一二三四五六七abcde三aghijk213124123 |
562 一二三四五六七ab四defghijk213124123 |
563 e二三四五六七abcdefghijk213124123 |
564 一二三四五六七abcdbfghijk213124123 |
565 taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
566 replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
567 ===================================================================
568 一二三四五六七abcdefghijk213124123 |
569 一二三四五六七abcdefghijk213124123 |
570 一二三四五六七abcdefghijk213124123 |
571 一二三四五六七abcdefghijk213124123 |
572 一二三四五六七abcdefghijk213124123 |
573 taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters order by ts limit 5
574 replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
575 ===================================================================
576 一二三四五六七abcdvar2fghijk213124123 |
577 一二三四五六七abcdefghijk213124123 |
578 一二三var2五六七abcdefghijk213124123 |
579 一二三四五六七abcdvar2fghijk213124123 |
580 一二三四五六七avar2cdefghijk213124123 |
581 taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
582 replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
583 ===================================================================
584 一二三四五六七abcdvar2fghijk213124123 |
585 一二三var2五六七abcdefghijk213124123 |
586 一二三四五六七abcdvar2fghijk213124123 |
587 一二三四五六七avar2cdefghijk213124123 |
588 一二三四五六七abcdefvar2hijk213124123 |
589 taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
590 replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
591 ===================================================================
592 一二三四五六七abcdefghijk213124123 |
593 一二三四五六七abcdefghijk213124123 |
594 一二三四五六七abcdefghijk213124123 |
595 一二三四五六七abcdefghijk213124123 |
596 一二三四五六七abcdefghijk213124123 |
597 taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters order by ts limit 5
598 replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
599 ===================================================================
600 一二三四五六七abcd四fghijk213124123 |
601 一二三四五六七abcdefghijk213124123 |
602 一二三c五六七abcdefghijk213124123 |
603 一二三四五六七abcd一fghijk213124123 |
604 一二三四五六七aecdefghijk213124123 |
605 taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
606 replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
607 ===================================================================
608 一二三四五六七abcd四fghijk213124123 |
609 一二三c五六七abcdefghijk213124123 |
610 一二三四五六七abcd一fghijk213124123 |
611 一二三四五六七aecdefghijk213124123 |
612 一二三四五六七abcdef一二三hijk213124123 |
613 taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
614 replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
615 ===================================================================
616 一二三四五六七abcdefghijk213124123 |
617 一二三四五六七abcdefghijk213124123 |
618 一二三四五六七abcdefghijk213124123 |
619 一二三四五六七abcdefghijk213124123 |
620 一二三四五六七abcdefghijk213124123 |
621 taos> select replace('aabbccdd','aa', 'ee')
622 replace('aabbccdd','aa', 'ee') |
623 =================================
624 eebbccdd |
625 taos> select replace('aabbccdd','AA', 'ee')
626 replace('aabbccdd','AA', 'ee') |
627 =================================
628 aabbccdd |
629 taos> select replace('北京','北' , '南')
630 replace('北京','北' , '南') |
631 ==================================
632 南京 |
633 taos> select replace('北京','京' , '南')
634 replace('北京','京' , '南') |
635 ==================================
636 北南 |
637 taos> select replace('北京taos','北' , '南')
638 replace('北京taos','北' , '南') |
639 ======================================
640 南京taos |
641 taos> select replace(nch1, nch2, 't') from ts_4893.d0 order by ts limit 10
642 replace(nch1, nch2, 't') |
643 =================================
644 novel |
645 一二三四五六七八九十 |
646 update |
647 prision |
648 novtl |
649 novel |
650 again |
651 一二三四五六七八九十 |
652 novel |
653 again |
654 taos> select replace(nch1, nch2, 't') from ts_4893.meters order by ts limit 10
655 replace(nch1, nch2, 't') |
656 =================================
657 novel |
658 一二三四五六七八九十 |
659 update |
660 prision |
661 novtl |
662 novel |
663 again |
664 一二三四五六七八九十 |
665 novel |
666 again |
667 taos> select replace(nch1, var2, 't') from ts_4893.d0 order by ts limit 10
668 replace(nch1, var2, 't') |
669 =================================
670 novtl |
671 一二三四五六七八九十 |
672 update |
673 prision |
674 novel |
675 novel |
676 again |
677 一二三四五六七八九十 |
678 novtl |
679 again |
680 taos> select replace(nch1, var2, 't') from ts_4893.meters order by ts limit 10
681 replace(nch1, var2, 't') |
682 =================================
683 novtl |
684 一二三四五六七八九十 |
685 update |
686 prision |
687 novel |
688 novel |
689 again |
690 一二三四五六七八九十 |
691 novtl |
692 again |
693 taos> select replace(var1, nch2, 't') from ts_4893.d0 order by ts limit 10
694 replace(var1, nch2, 't') |
695 =================================
696 novel |
697 person |
698 novel |
699 plate |
700 一二三四五六七八九十 |
701 update |
702 prision |
703 person |
704 prision |
705 plate |
706 taos> select replace(var1, nch2, 't') from ts_4893.meters order by ts limit 10
707 replace(var1, nch2, 't') |
708 =================================
709 novel |
710 person |
711 novel |
712 plate |
713 一二三四五六七八九十 |
714 update |
715 prision |
716 person |
717 prision |
718 plate |
719 taos> select replace(var1, var2, 't') from ts_4893.d0 order by ts limit 10
720 replace(var1, var2, 't') |
721 =================================
722 novtl |
723 person |
724 novel |
725 platt |
726 一二三四五六七八九十 |
727 update |
728 prision |
729 person |
730 prision |
731 plate |
732 taos> select replace(var1, var2, 't') from ts_4893.meters order by ts limit 10
733 replace(var1, var2, 't') |
734 =================================
735 novtl |
736 person |
737 novel |
738 platt |
739 一二三四五六七八九十 |
740 update |
741 prision |
742 person |
743 prision |
744 plate |
745 taos> select replace(nch1, nch2, var1) from ts_4893.d0 order by ts limit 10
746 replace(nch1, nch2, var1) |
747 =================================
748 novel |
749 一二三四五六七八九十 |
750 update |
751 prision |
752 nov一二三四五六七八九十l |
753 novel |
754 again |
755 一二三四五六七八九十 |
756 novel |
757 again |
758 taos> select replace(nch1, nch2, var1) from ts_4893.meters order by ts limit 10
759 replace(nch1, nch2, var1) |
760 =================================
761 novel |
762 一二三四五六七八九十 |
763 update |
764 prision |
765 nov一二三四五六七八九十l |
766 novel |
767 again |
768 一二三四五六七八九十 |
769 novel |
770 again |
771 taos> select replace(null, 'aa', 'ee')
772 replace(null, 'aa', 'ee') |
773 ============================
774 NULL |
775 taos> select replace(null, 'A', 'B')
776 replace(null, 'A', 'B') |
777 ==========================
778 NULL |
779 taos> select replace('', '', 'B')
780 replace('', '', 'B') |
781 =======================
782 |
783 taos> select replace('', 'A', 'B')
784 replace('', 'A', 'B') |
785 ========================
786 |
787 taos> select replace('A', 'A', '')
788 replace('A', 'A', '') |
789 ========================
790 |
791 taos> select replace('aabbccdd', null, 'ee')
792 replace('aabbccdd', null, 'ee') |
793 ==================================
794 NULL |
795 taos> select replace('Hello', 'Z', 'X')
796 replace('Hello', 'Z', 'X') |
797 =============================
798 Hello |
799 taos> select replace('Hello World', ' ', '_')
800 replace('Hello World', ' ', '_') |
801 ===================================
802 Hello_World |
803 taos> select replace('Hello World', 'World', 'MySQL')
804 replace('Hello World', 'World', 'MySQL') |
805 ===========================================
806 Hello MySQL |
807 taos> select replace('12345', '5', 'five')
808 replace('12345', '5', 'five') |
809 ================================
810 1234five |
811 taos> select replace('中国', '中', '国')
812 replace('中国', '中', '国') |
813 ==================================
814 国国 |
815 taos> select replace('é', 'e', 'a')
816 replace('é', 'e', 'a') |
817 ==========================
818 é |
819 taos> select replace('!@#', '@', '#')
820 replace('!@#', '@', '#') |
821 ===========================
822 !## |
823 taos> select replace('123456', '7', 'eight')
824 replace('123456', '7', 'eight') |
825 ==================================
826 123456 |
827 taos> select replace(concat('A', 'B', 'C'), 'B', 'Z')
828 replace(concat('A', 'B', 'C'), 'B', 'Z') |
829 ===========================================
830 AZC |
831 taos> select replace(upper('abc'), 'A', 'X')
832 replace(upper('abc'), 'A', 'X') |
833 ==================================
834 XBC |
835 taos> select replace(trim(' Hello '), 'l', 'L')
836 replace(trim(' Hello '), 'l', 'L') |
837 =======================================
838 HeLLo |
839 taos> select replace(lower('HELLO'), 'h', 'H')
840 replace(lower('HELLO'), 'h', 'H') |
841 ====================================
842 Hello |
843 taos> select name, replace(substring(name, 1, 5), 'e', 'o') from ts_4893.meters limit 1
844 name | replace(substring(name, 1, 5), 'e', 'o') |
845 ============================================================================
846 lili | lili |
847 taos> select name, replace(name, 'a', 'o') from ts_4893.meters limit 1
848 name | replace(name, 'a', 'o') |
849 ==================================================================
850 lili | lili |
851 taos> select var1, replace(var1, '1', 'one') from ts_4893.meters limit 1
852 var1 | replace(var1, '1', 'one') |
853 ==================================================================
854 novel | novel |
855 taos> select nch1, replace(nch1, 'n', 'm') from ts_4893.meters limit 1
856 nch1 | replace(nch1, 'n', 'm') |
857 ==================================================================
858 novel | movel |

View File

@ -1,94 +1,310 @@
10.550000000000001
10.550000000000001 taos> select ROUND(10.55, 3)
10.600000000000000 round(10.55, 3) |
11.000000000000000 ============================
11.000000000000000 10.550000000000001 |
10.000000000000000
0.000000000000000 taos> select ROUND(10.55, 2)
-10.600000000000000 round(10.55, 2) |
99 ============================
111.000000000000000 10.550000000000001 |
112.000000000000000
12.000000000000000 taos> select ROUND(10.55, 1)
11.600000000000000 round(10.55, 1) |
1.230000000000000e+02 ============================
1.230000000000000e+08 10.600000000000000 |
11.0000000
9.0000000 taos> select ROUND(10.55, 0)
10.0000000 round(10.55, 0) |
11.0000000 ============================
11.0000000 11.000000000000000 |
9.0000000
10.0000000 taos> select ROUND(10.55)
11.0000000 round(10.55) |
11.0000000 ============================
10.0000000 11.000000000000000 |
11.0000000
9.0000000 taos> select ROUND(10.55, -1)
11.0000000 round(10.55, -1) |
8.0000000 ============================
12.0000000 10.000000000000000 |
9.0000000
10.0000000 taos> select ROUND(10.55, -10)
10.0000000 round(10.55, -10) |
10.0000000 ============================
10.0000000 0.000000000000000 |
8.765432100000000e+07
8.765432109999999e+07 taos> select ROUND(-10.55, 1)
8.765432112000000e+07 round(-10.55, 1) |
8.765432112300000e+07 ============================
8.765432112350000e+07 -10.600000000000000 |
8.765432112345999e+07
8.765432112345700e+07 taos> select ROUND(99, 1)
8.765432112345681e+07 round(99, 1) |
8.765432112345679e+07 ========================
8.765432112345679e+07 99 |
11.0000000
8.6000004 taos> select ROUND(111.1111)
9.8000002 round(111.1111) |
11.2329998 ============================
10.7060003 111.000000000000000 |
8.5080004
9.5959997 taos> select ROUND(111.5111)
10.9619999 round(111.5111) |
11.2259998 ============================
10.3369999 112.000000000000000 |
10.6999998
8.6000004 taos> select ROUND(10.55) + 1
9.8000002 round(10.55) + 1 |
11.1999998 ============================
10.6999998 12.000000000000000 |
8.5000000
9.6000004 taos> select ROUND(10.55, 1) + 1
11.0000000 round(10.55, 1) + 1 |
11.1999998 ============================
10.3000002 11.600000000000000 |
10.55
10.55 taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123.123456789, 9), 8), 7), 6), 5), 4))
10.6 round(round(round(round(round(round(round(123.123456789, 9), 8), |
11 ===================================================================
11 1.230000000000000e+02 |
10
0 taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123456789.123456789, -1), -2), -3), -4), -5), -6))
-10.6 round(round(round(round(round(round(round(123456789.123456789, - |
99 ===================================================================
11 1.230000000000000e+08 |
9
10 taos> select ROUND(current) from ts_4893.meters order by ts limit 20
11 round(current) |
11 =======================
9 11.0000000 |
10 9.0000000 |
11 10.0000000 |
11 11.0000000 |
10 11.0000000 |
11 9.0000000 |
9 10.0000000 |
10 11.0000000 |
11 11.0000000 |
11 10.0000000 |
9 11.0000000 |
10 9.0000000 |
11 11.0000000 |
11 8.0000000 |
10 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 |

1 10.550000000000001 taos> select ROUND(10.55, 3)
2 10.550000000000001 round(10.55, 3) |
3 10.600000000000000 ============================
4 11.000000000000000 10.550000000000001 |
5 11.000000000000000 taos> select ROUND(10.55, 2)
6 10.000000000000000 round(10.55, 2) |
7 0.000000000000000 ============================
8 -10.600000000000000 10.550000000000001 |
9 99 taos> select ROUND(10.55, 1)
10 111.000000000000000 round(10.55, 1) |
11 112.000000000000000 ============================
12 12.000000000000000 10.600000000000000 |
13 11.600000000000000 taos> select ROUND(10.55, 0)
14 1.230000000000000e+02 round(10.55, 0) |
15 1.230000000000000e+08 ============================
16 11.0000000 11.000000000000000 |
17 9.0000000 taos> select ROUND(10.55)
18 10.0000000 round(10.55) |
19 11.0000000 ============================
20 11.0000000 11.000000000000000 |
21 9.0000000 taos> select ROUND(10.55, -1)
22 10.0000000 round(10.55, -1) |
23 11.0000000 ============================
24 11.0000000 10.000000000000000 |
25 10.0000000 taos> select ROUND(10.55, -10)
26 11.0000000 round(10.55, -10) |
27 9.0000000 ============================
28 11.0000000 0.000000000000000 |
29 8.0000000 taos> select ROUND(-10.55, 1)
30 12.0000000 round(-10.55, 1) |
31 9.0000000 ============================
32 10.0000000 -10.600000000000000 |
33 10.0000000 taos> select ROUND(99, 1)
34 10.0000000 round(99, 1) |
35 10.0000000 ========================
36 8.765432100000000e+07 99 |
37 8.765432109999999e+07 taos> select ROUND(111.1111)
38 8.765432112000000e+07 round(111.1111) |
39 8.765432112300000e+07 ============================
40 8.765432112350000e+07 111.000000000000000 |
41 8.765432112345999e+07 taos> select ROUND(111.5111)
42 8.765432112345700e+07 round(111.5111) |
43 8.765432112345681e+07 ============================
44 8.765432112345679e+07 112.000000000000000 |
45 8.765432112345679e+07 taos> select ROUND(10.55) + 1
46 11.0000000 round(10.55) + 1 |
47 8.6000004 ============================
48 9.8000002 12.000000000000000 |
49 11.2329998 taos> select ROUND(10.55, 1) + 1
50 10.7060003 round(10.55, 1) + 1 |
51 8.5080004 ============================
52 9.5959997 11.600000000000000 |
53 10.9619999 taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123.123456789, 9), 8), 7), 6), 5), 4))
54 11.2259998 round(round(round(round(round(round(round(123.123456789, 9), 8), |
55 10.3369999 ===================================================================
56 10.6999998 1.230000000000000e+02 |
57 8.6000004 taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123456789.123456789, -1), -2), -3), -4), -5), -6))
58 9.8000002 round(round(round(round(round(round(round(123456789.123456789, - |
59 11.1999998 ===================================================================
60 10.6999998 1.230000000000000e+08 |
61 8.5000000 taos> select ROUND(current) from ts_4893.meters order by ts limit 20
62 9.6000004 round(current) |
63 11.0000000 =======================
64 11.1999998 11.0000000 |
65 10.3000002 9.0000000 |
66 10.55 10.0000000 |
67 10.55 11.0000000 |
68 10.6 11.0000000 |
69 11 9.0000000 |
70 11 10.0000000 |
71 10 11.0000000 |
72 0 11.0000000 |
73 -10.6 10.0000000 |
74 99 11.0000000 |
75 11 9.0000000 |
76 9 11.0000000 |
77 10 8.0000000 |
78 11 12.0000000 |
79 11 9.0000000 |
80 9 10.0000000 |
81 10 10.0000000 |
82 11 10.0000000 |
83 11 10.0000000 |
84 10 taos> select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit 10
85 11 round(87654321.123456789, id) |
86 9 ================================
87 10 8.765432100000000e+07 |
88 11 8.765432109999999e+07 |
89 11 8.765432112000000e+07 |
90 9 8.765432112300000e+07 |
91 10 8.765432112350000e+07 |
92 11 8.765432112345999e+07 |
93 11 8.765432112345700e+07 |
94 10 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 |
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310

View File

@ -1,310 +0,0 @@
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 |
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 |

View File

@ -1,70 +1,275 @@
0
1 taos> select SIGN(0)
1.000000000000000 sign(0) |
1 ========================
-1 0 |
-1.000000000000000
-1 taos> select SIGN(1)
2.000000000000000 sign(1) |
0.000000000000000 ========================
1.000000000000000 1 |
1.000000000000000
1 taos> select SIGN(1.5)
1 sign(1.5) |
1 ============================
1 1.000000000000000 |
1
2.000000000000000 taos> select SIGN(100)
0.000000000000000 sign(100) |
2.000000000000000 ========================
0.500000000000000 1 |
2.000000000000000
0.000000000000000 taos> select SIGN(-1)
1.000000000000000 sign(-1) |
1.000000000000000 ========================
1.000000000000000 -1 |
2.000000000000000
3.000000000000000 taos> select SIGN(-1.5)
4.000000000000000 sign(-1.5) |
5.000000000000000 ============================
0.000000000000000 -1.000000000000000 |
2.000000000000000
3.000000000000000 taos> select SIGN(-100)
4.000000000000000 sign(-100) |
5.000000000000000 ========================
1 -1 |
1
1 taos> select SIGN(1) + 1
1.000000000000000 sign(1) + 1 |
1.000000000000000 ============================
1 2.000000000000000 |
0.000000000000000
1.000000000000000 taos> select SIGN(1) - 1
1.000000000000000 sign(1) - 1 |
1.000000000000000 ============================
1.000000000000000 0.000000000000000 |
0
1 taos> select SIGN(1) * 1
1 sign(1) * 1 |
-1 ============================
-1 1.000000000000000 |
1
1 taos> select SIGN(1) / 1
1 sign(1) / 1 |
1 ============================
1 1.000000000000000 |
1
1 taos> select SIGN(1) from ts_4893.meters limit 5
1 sign(1) |
1 ========================
1 1 |
1 1 |
1 1 |
1 1 |
1 1 |
1
1 taos> select SIGN(1) + 1 from ts_4893.meters limit 1
1 sign(1) + 1 |
1 ============================
1 2.000000000000000 |
1
taos> select SIGN(1) - 1 from ts_4893.meters limit 1
sign(1) - 1 |
============================
0.000000000000000 |
taos> select SIGN(1) * 2 from ts_4893.meters limit 1
sign(1) * 2 |
============================
2.000000000000000 |
taos> select SIGN(1) / 2 from ts_4893.meters limit 1
sign(1) / 2 |
============================
0.500000000000000 |
taos> select SIGN(2) + SIGN(1) from ts_4893.meters limit 1
sign(2) + sign(1) |
============================
2.000000000000000 |
taos> select SIGN(2) - SIGN(1) from ts_4893.meters limit 1
sign(2) - sign(1) |
============================
0.000000000000000 |
taos> select SIGN(2) * SIGN(1) from ts_4893.meters limit 1
sign(2) * sign(1) |
============================
1.000000000000000 |
taos> select SIGN(2) / SIGN(1) from ts_4893.meters limit 1
sign(2) / sign(1) |
============================
1.000000000000000 |
taos> select SIGN(1) + id from ts_4893.meters order by ts limit 5
sign(1) + id |
============================
1.000000000000000 |
2.000000000000000 |
3.000000000000000 |
4.000000000000000 |
5.000000000000000 |
taos> select SIGN(id) + id from ts_4893.meters order by ts limit 5
sign(id) + id |
============================
0.000000000000000 |
2.000000000000000 |
3.000000000000000 |
4.000000000000000 |
5.000000000000000 |
taos> select SIGN(abs(10))
sign(abs(10)) |
========================
1 |
taos> select SIGN(abs(-10))
sign(abs(-10)) |
========================
1 |
taos> select abs(SIGN(10))
abs(sign(10)) |
========================
1 |
taos> select pow(SIGN(10), 2)
pow(sign(10), 2) |
============================
1.000000000000000 |
taos> select sqrt(SIGN(10))
sqrt(sign(10)) |
============================
1.000000000000000 |
taos> select cast(SIGN(10) as int)
cast(sign(10) as int) |
========================
1 |
taos> select SIGN(sqrt(id)) from ts_4893.meters order by ts limit 5
sign(sqrt(id)) |
============================
0.000000000000000 |
1.000000000000000 |
1.000000000000000 |
1.000000000000000 |
1.000000000000000 |
taos> select SIGN(SIGN(SIGN(SIGN(0))))
sign(sign(sign(sign(0)))) |
============================
0 |
taos> select sign(1)
sign(1) |
========================
1 |
taos> select sign(10)
sign(10) |
========================
1 |
taos> select sign(-1)
sign(-1) |
========================
-1 |
taos> select sign(-10)
sign(-10) |
========================
-1 |
taos> select sign(current) from ts_4893.d0 order by ts limit 10
sign(current) |
=======================
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
taos> select sign(current) from ts_4893.meters order by ts limit 10
sign(current) |
=======================
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
taos> select sign(null)
sign(null) |
========================
NULL |
taos> select sign(25)
sign(25) |
========================
1 |
taos> select sign(-10)
sign(-10) |
========================
-1 |
taos> select sign(0.1)
sign(0.1) |
============================
1.000000000000000 |
taos> select sign(-0.1)
sign(-0.1) |
============================
-1.000000000000000 |
taos> select sign(current) from ts_4893.meters limit 1
sign(current) |
=======================
1.0000000 |
taos> select sign(voltage) from ts_4893.meters limit 1
sign(voltage) |
================
1 |
taos> select sign(phase) from ts_4893.meters limit 1
sign(phase) |
=======================
1.0000000 |
taos> select sign(abs(voltage)) from ts_4893.meters limit 1
sign(abs(voltage)) |
=====================
1 |
taos> select sign(round(current)) from ts_4893.meters limit 1
sign(round(current)) |
=======================
1.0000000 |
taos> select sign(sqrt(voltage)) from ts_4893.meters limit 1
sign(sqrt(voltage)) |
============================
1.000000000000000 |
taos> select sign(log(current + 1)) from ts_4893.meters limit 1
sign(log(current + 1)) |
============================
1.000000000000000 |

Can't render this file because it has a wrong number of fields in line 139.

View File

@ -1,275 +0,0 @@
taos> select SIGN(0)
sign(0) |
========================
0 |
taos> select SIGN(1)
sign(1) |
========================
1 |
taos> select SIGN(1.5)
sign(1.5) |
============================
1.000000000000000 |
taos> select SIGN(100)
sign(100) |
========================
1 |
taos> select SIGN(-1)
sign(-1) |
========================
-1 |
taos> select SIGN(-1.5)
sign(-1.5) |
============================
-1.000000000000000 |
taos> select SIGN(-100)
sign(-100) |
========================
-1 |
taos> select SIGN(1) + 1
sign(1) + 1 |
============================
2.000000000000000 |
taos> select SIGN(1) - 1
sign(1) - 1 |
============================
0.000000000000000 |
taos> select SIGN(1) * 1
sign(1) * 1 |
============================
1.000000000000000 |
taos> select SIGN(1) / 1
sign(1) / 1 |
============================
1.000000000000000 |
taos> select SIGN(1) from ts_4893.meters limit 5
sign(1) |
========================
1 |
1 |
1 |
1 |
1 |
taos> select SIGN(1) + 1 from ts_4893.meters limit 1
sign(1) + 1 |
============================
2.000000000000000 |
taos> select SIGN(1) - 1 from ts_4893.meters limit 1
sign(1) - 1 |
============================
0.000000000000000 |
taos> select SIGN(1) * 2 from ts_4893.meters limit 1
sign(1) * 2 |
============================
2.000000000000000 |
taos> select SIGN(1) / 2 from ts_4893.meters limit 1
sign(1) / 2 |
============================
0.500000000000000 |
taos> select SIGN(2) + SIGN(1) from ts_4893.meters limit 1
sign(2) + sign(1) |
============================
2.000000000000000 |
taos> select SIGN(2) - SIGN(1) from ts_4893.meters limit 1
sign(2) - sign(1) |
============================
0.000000000000000 |
taos> select SIGN(2) * SIGN(1) from ts_4893.meters limit 1
sign(2) * sign(1) |
============================
1.000000000000000 |
taos> select SIGN(2) / SIGN(1) from ts_4893.meters limit 1
sign(2) / sign(1) |
============================
1.000000000000000 |
taos> select SIGN(1) + id from ts_4893.meters order by ts limit 5
sign(1) + id |
============================
1.000000000000000 |
2.000000000000000 |
3.000000000000000 |
4.000000000000000 |
5.000000000000000 |
taos> select SIGN(id) + id from ts_4893.meters order by ts limit 5
sign(id) + id |
============================
0.000000000000000 |
2.000000000000000 |
3.000000000000000 |
4.000000000000000 |
5.000000000000000 |
taos> select SIGN(abs(10))
sign(abs(10)) |
========================
1 |
taos> select SIGN(abs(-10))
sign(abs(-10)) |
========================
1 |
taos> select abs(SIGN(10))
abs(sign(10)) |
========================
1 |
taos> select pow(SIGN(10), 2)
pow(sign(10), 2) |
============================
1.000000000000000 |
taos> select sqrt(SIGN(10))
sqrt(sign(10)) |
============================
1.000000000000000 |
taos> select cast(SIGN(10) as int)
cast(sign(10) as int) |
========================
1 |
taos> select SIGN(sqrt(id)) from ts_4893.meters order by ts limit 5
sign(sqrt(id)) |
============================
0.000000000000000 |
1.000000000000000 |
1.000000000000000 |
1.000000000000000 |
1.000000000000000 |
taos> select SIGN(SIGN(SIGN(SIGN(0))))
sign(sign(sign(sign(0)))) |
============================
0 |
taos> select sign(1)
sign(1) |
========================
1 |
taos> select sign(10)
sign(10) |
========================
1 |
taos> select sign(-1)
sign(-1) |
========================
-1 |
taos> select sign(-10)
sign(-10) |
========================
-1 |
taos> select sign(current) from ts_4893.d0 order by ts limit 10
sign(current) |
=======================
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
taos> select sign(current) from ts_4893.meters order by ts limit 10
sign(current) |
=======================
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
1.0000000 |
taos> select sign(null)
sign(null) |
========================
NULL |
taos> select sign(25)
sign(25) |
========================
1 |
taos> select sign(-10)
sign(-10) |
========================
-1 |
taos> select sign(0.1)
sign(0.1) |
============================
1.000000000000000 |
taos> select sign(-0.1)
sign(-0.1) |
============================
-1.000000000000000 |
taos> select sign(current) from ts_4893.meters limit 1
sign(current) |
=======================
1.0000000 |
taos> select sign(voltage) from ts_4893.meters limit 1
sign(voltage) |
================
1 |
taos> select sign(phase) from ts_4893.meters limit 1
sign(phase) |
=======================
1.0000000 |
taos> select sign(abs(voltage)) from ts_4893.meters limit 1
sign(abs(voltage)) |
=====================
1 |
taos> select sign(round(current)) from ts_4893.meters limit 1
sign(round(current)) |
=======================
1.0000000 |
taos> select sign(sqrt(voltage)) from ts_4893.meters limit 1
sign(sqrt(voltage)) |
============================
1.000000000000000 |
taos> select sign(log(current + 1)) from ts_4893.meters limit 1
sign(log(current + 1)) |
============================
1.000000000000000 |
Can't render this file because it has a wrong number of fields in line 139.

View File

@ -1,37 +1,138 @@
1.154339668872968
0.838273408289688 taos> select STDDEV(current) from ts_4893.meters
0.838639277789964 stddev(current) |
0.839707477142887 ============================
0.839707477142887 1.154339668872967 |
0.840565842326812
0.844574982206356 taos> select STDDEV(current) from ts_4893.meters interval(1d) order by 1 limit 10
0.846680761198646 stddev(current) |
0.847012832740021 ============================
0.847182714923875 0.838273408289689 |
0.848223610563542 0.838639277789961 |
2886.751331514371941 0.839707477142884 |
4.609772228646444 0.839707477142884 |
8.366600265340756 0.840565842326814 |
8.366600265340756 0.844574982206356 |
8.366600265340756 0.846680761198646 |
8.366600265340756 0.847012832740024 |
8.077747210701755 0.847182714923872 |
8.366600265340756 0.848223610563545 |
8.366600265340756
8.366600265340756 taos> select STDDEV(id) from ts_4893.meters
8.366600265340756 stddev(id) |
2857.595142773027419 ============================
4.609772228646444 2886.751331514371941 |
5.477225575051661
8.077747210701755 taos> select STDDEV(id) from ts_4893.meters interval(1d) limit 10
8.077747210701755 stddev(id) |
8.077747210701755 ============================
8.077747210701755 4.609772228646444 |
8.077747210701755 8.366600265340756 |
8.077747210701755 8.366600265340756 |
8.077747210701755 8.366600265340756 |
8.077747210701755 8.366600265340756 |
2886.751331514371941 8.077747210701755 |
2886.751331514371941 8.366600265340756 |
1.154339668872967 8.366600265340756 |
1.154339668872967 8.366600265340756 |
8.366600265340756 |
taos> select STDDEV(id) from ts_4893.meters where id > 100
stddev(id) |
============================
2857.595142773027419 |
taos> select STDDEV(id) from ts_4893.meters interval(1d) order by 1 limit 10
stddev(id) |
============================
4.609772228646444 |
5.477225575051661 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
taos> select stddev_pop(null) from ts_4893.meters
stddev_pop(null) |
============================
NULL |
taos> select stddev_pop(id) from ts_4893.d0
stddev_pop(id) |
============================
2886.751331514371941 |
taos> select stddev_pop(id) from ts_4893.meters
stddev_pop(id) |
============================
2886.751331514371941 |
taos> select stddev_pop(current) from ts_4893.d0
stddev_pop(current) |
============================
1.154339668872967 |
taos> select stddev_pop(current) from ts_4893.meters
stddev_pop(current) |
============================
1.154339668872967 |
taos> select stddev_pop(voltage) from ts_4893.meters
stddev_pop(voltage) |
============================
2.876459705957324 |
taos> select stddev_pop(voltage) from ts_4893.meters where voltage is not null
stddev_pop(voltage) |
============================
2.876459705957324 |
taos> select stddev_pop(phase) from ts_4893.meters
stddev_pop(phase) |
============================
0.288595458155823 |
taos> select stddev_pop(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
stddev_pop(phase) |
============================
0.288075357974611 |
taos> select stddev_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
stddev_pop(total_voltage) |
============================
0.000000000000000 |
taos> select round(stddev_pop(current), 2) from ts_4893.meters
round(stddev_pop(current), 2) |
================================
1.150000000000000e+00 |
taos> select pow(stddev_pop(current), 2) from ts_4893.meters
pow(stddev_pop(current), 2) |
==============================
1.332500071133751e+00 |
taos> select log(stddev_pop(voltage) + 1) from ts_4893.meters
log(stddev_pop(voltage) + 1) |
===============================
1.354922290183882e+00 |
taos> select groupid, stddev_pop(voltage) from ts_4893.meters group by groupid order by groupid
groupid | stddev_pop(voltage) |
======================================
1 | 2.876459705957324 |
taos> select location, stddev_pop(current) from ts_4893.meters group by location order by location
location | stddev_pop(current) |
=================================================
beijing | 1.154339668872967 |
taos> select location, stddev_pop(voltage) from ts_4893.meters group by location order by location
location | stddev_pop(voltage) |
=================================================
beijing | 2.876459705957324 |

Can't render this file because it has a wrong number of fields in line 109.

View File

@ -1,138 +0,0 @@
taos> select STDDEV(current) from ts_4893.meters
stddev(current) |
============================
1.154339668872967 |
taos> select STDDEV(current) from ts_4893.meters interval(1d) order by 1 limit 10
stddev(current) |
============================
0.838273408289689 |
0.838639277789961 |
0.839707477142884 |
0.839707477142884 |
0.840565842326814 |
0.844574982206356 |
0.846680761198646 |
0.847012832740024 |
0.847182714923872 |
0.848223610563545 |
taos> select STDDEV(id) from ts_4893.meters
stddev(id) |
============================
2886.751331514371941 |
taos> select STDDEV(id) from ts_4893.meters interval(1d) limit 10
stddev(id) |
============================
4.609772228646444 |
8.366600265340756 |
8.366600265340756 |
8.366600265340756 |
8.366600265340756 |
8.077747210701755 |
8.366600265340756 |
8.366600265340756 |
8.366600265340756 |
8.366600265340756 |
taos> select STDDEV(id) from ts_4893.meters where id > 100
stddev(id) |
============================
2857.595142773027419 |
taos> select STDDEV(id) from ts_4893.meters interval(1d) order by 1 limit 10
stddev(id) |
============================
4.609772228646444 |
5.477225575051661 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
8.077747210701755 |
taos> select stddev_pop(null) from ts_4893.meters
stddev_pop(null) |
============================
NULL |
taos> select stddev_pop(id) from ts_4893.d0
stddev_pop(id) |
============================
2886.751331514371941 |
taos> select stddev_pop(id) from ts_4893.meters
stddev_pop(id) |
============================
2886.751331514371941 |
taos> select stddev_pop(current) from ts_4893.d0
stddev_pop(current) |
============================
1.154339668872967 |
taos> select stddev_pop(current) from ts_4893.meters
stddev_pop(current) |
============================
1.154339668872967 |
taos> select stddev_pop(voltage) from ts_4893.meters
stddev_pop(voltage) |
============================
2.876459705957324 |
taos> select stddev_pop(voltage) from ts_4893.meters where voltage is not null
stddev_pop(voltage) |
============================
2.876459705957324 |
taos> select stddev_pop(phase) from ts_4893.meters
stddev_pop(phase) |
============================
0.288595458155823 |
taos> select stddev_pop(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
stddev_pop(phase) |
============================
0.288075357974611 |
taos> select stddev_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
stddev_pop(total_voltage) |
============================
0.000000000000000 |
taos> select round(stddev_pop(current), 2) from ts_4893.meters
round(stddev_pop(current), 2) |
================================
1.150000000000000e+00 |
taos> select pow(stddev_pop(current), 2) from ts_4893.meters
pow(stddev_pop(current), 2) |
==============================
1.332500071133751e+00 |
taos> select log(stddev_pop(voltage) + 1) from ts_4893.meters
log(stddev_pop(voltage) + 1) |
===============================
1.354922290183882e+00 |
taos> select groupid, stddev_pop(voltage) from ts_4893.meters group by groupid order by groupid
groupid | stddev_pop(voltage) |
======================================
1 | 2.876459705957324 |
taos> select location, stddev_pop(current) from ts_4893.meters group by location order by location
location | stddev_pop(current) |
=================================================
beijing | 1.154339668872967 |
taos> select location, stddev_pop(voltage) from ts_4893.meters group by location order by location
location | stddev_pop(voltage) |
=================================================
beijing | 2.876459705957324 |
Can't render this file because it has a wrong number of fields in line 109.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,798 +0,0 @@
taos> select substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)
substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2) |
=====================================================
1abcd;2abcd |
taos> select substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2)
substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2) |
======================================================
3abcd;4abcd |
taos> select substring_index('www.taosdata.com','taos',1)
substring_index('www.taosdata.com','taos',1) |
===============================================
www. |
taos> select substring_index('www.taosdata.com','taos',-1)
substring_index('www.taosdata.com','taos',-1) |
================================================
data.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 1)
substring_index('www.taosdata.com', '.', 1) |
==============================================
www |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -1)
substring_index('www.taosdata.com', '.', -1) |
===============================================
com |
taos> select substring_index('www.taosdata.com','.',-2)
substring_index('www.taosdata.com','.',-2) |
=============================================
taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 100)
substring_index('www.taosdata.com', '.', 100) |
================================================
www.taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -100)
substring_index('www.taosdata.com', '.', -100) |
=================================================
www.taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483647)
substring_index('www.taosdata.com', '.', 2147483647) |
=======================================================
www.taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483647)
substring_index('www.taosdata.com', '.', -2147483647) |
========================================================
www.taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483648)
substring_index('www.taosdata.com', '.', 2147483648) |
=======================================================
www.taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483648)
substring_index('www.taosdata.com', '.', -2147483648) |
========================================================
www.taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483649)
substring_index('www.taosdata.com', '.', 2147483649) |
=======================================================
www.taosdata.com |
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483649)
substring_index('www.taosdata.com', '.', -2147483649) |
========================================================
www.taosdata.com |
taos> select substring_index('.taosdata.com','.',-2)
substring_index('.taosdata.com','.',-2) |
==========================================
taosdata.com |
taos> select substring_index('.taosdata.com','.tcx',-1)
substring_index('.taosdata.com','.tcx',-1) |
=============================================
.taosdata.com |
taos> select substring_index('aaaaaaaaa1','aa',2)
substring_index('aaaaaaaaa1','aa',2) |
=======================================
aa |
taos> select substring_index('aaaaaaaaa1','aa',3)
substring_index('aaaaaaaaa1','aa',3) |
=======================================
aaaa |
taos> select substring_index('aaaaaaaaa1','aa',4)
substring_index('aaaaaaaaa1','aa',4) |
=======================================
aaaaaa |
taos> select substring_index('aaaaaaaaa1','aa',5)
substring_index('aaaaaaaaa1','aa',5) |
=======================================
aaaaaaaaa1 |
taos> select substring_index('aaaaaaaaa1','aaa',2)
substring_index('aaaaaaaaa1','aaa',2) |
========================================
aaa |
taos> select substring_index('aaaaaaaaa1','aaa',3)
substring_index('aaaaaaaaa1','aaa',3) |
========================================
aaaaaa |
taos> select substring_index('aaaaaaaaa1','aaa',4)
substring_index('aaaaaaaaa1','aaa',4) |
========================================
aaaaaaaaa1 |
taos> select substring_index('aaaaaaaaa1','aaaa',2)
substring_index('aaaaaaaaa1','aaaa',2) |
=========================================
aaaa |
taos> select substring_index('aaaaaaaaa1','1',1)
substring_index('aaaaaaaaa1','1',1) |
======================================
aaaaaaaaa |
taos> select substring_index('aaaaaaaaa1','a',-1)
substring_index('aaaaaaaaa1','a',-1) |
=======================================
1 |
taos> select substring_index('aaaaaaaaa1','aa',-1)
substring_index('aaaaaaaaa1','aa',-1) |
========================================
1 |
taos> select substring_index('aaaaaaaaa1','aa',-2)
substring_index('aaaaaaaaa1','aa',-2) |
========================================
aa1 |
taos> select substring_index('aaaaaaaaa1','aa',-3)
substring_index('aaaaaaaaa1','aa',-3) |
========================================
aaaa1 |
taos> select substring_index('aaaaaaaaa1','aa',-4)
substring_index('aaaaaaaaa1','aa',-4) |
========================================
aaaaaa1 |
taos> select substring_index('aaaaaaaaa1','aa',-5)
substring_index('aaaaaaaaa1','aa',-5) |
========================================
aaaaaaaaa1 |
taos> select substring_index('aaaaaaaaa1','aaa',-1)
substring_index('aaaaaaaaa1','aaa',-1) |
=========================================
1 |
taos> select substring_index('aaaaaaaaa1','aaa',-2)
substring_index('aaaaaaaaa1','aaa',-2) |
=========================================
aaa1 |
taos> select substring_index('aaaaaaaaa1','aaa',-3)
substring_index('aaaaaaaaa1','aaa',-3) |
=========================================
aaaaaa1 |
taos> select substring_index('aaaaaaaaa1','aaa',-4)
substring_index('aaaaaaaaa1','aaa',-4) |
=========================================
aaaaaaaaa1 |
taos> select substring_index('the king of thethe hill','the',-2)
substring_index('the king of thethe hill','the',-2) |
======================================================
the hill |
taos> select substring_index('the king of the the hill','the',-2)
substring_index('the king of the the hill','the',-2) |
=======================================================
the hill |
taos> select substring_index('the king of the the hill','the',-2)
substring_index('the king of the the hill','the',-2) |
========================================================
the hill |
taos> select substring_index('the king of the the hill',' the ',-1)
substring_index('the king of the the hill',' the ',-1) |
==========================================================
hill |
taos> select substring_index('the king of the the hill',' the ',-2)
substring_index('the king of the the hill',' the ',-2) |
==========================================================
the hill |
taos> select substring_index('the king of the the hill',' ',-1)
substring_index('the king of the the hill',' ',-1) |
======================================================
hill |
taos> select substring_index('the king of the the hill',' ',-2)
substring_index('the king of the the hill',' ',-2) |
======================================================
the hill |
taos> select substring_index('the king of the the hill',' ',-3)
substring_index('the king of the the hill',' ',-3) |
======================================================
the hill |
taos> select substring_index('the king of the the hill',' ',-4)
substring_index('the king of the the hill',' ',-4) |
======================================================
the the hill |
taos> select substring_index('the king of the the hill',' ',-5)
substring_index('the king of the the hill',' ',-5) |
======================================================
of the the hill |
taos> select substring_index('the king of the.the hill','the',-2)
substring_index('the king of the.the hill','the',-2) |
=======================================================
.the hill |
taos> select substring_index('the king of thethethe.the hill','the',-3)
substring_index('the king of thethethe.the hill','the',-3) |
=============================================================
the.the hill |
taos> select substring_index('the king of thethethe.the hill','the',-1)
substring_index('the king of thethethe.the hill','the',-1) |
=============================================================
hill |
taos> select substring_index('the king of the the hill','the',2)
substring_index('the king of the the hill','the',2) |
======================================================
the king of |
taos> select substring_index('the king of the the hill','the',3)
substring_index('the king of the the hill','the',3) |
======================================================
the king of the |
taos> select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) > 1 order by ts limit 5
substring_index(nch1, nch2, 1) |
=================================
nov |
a |
一二三a |
一二三 |
p |
taos> select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
substring_index(nch1, nch2, 1) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
taos> select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5
substring_index(nch1, nch2, -2) |
==================================
novel |
c一二三abc |
一二三abc |
一二三四五六七八九十 |
person |
taos> select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
substring_index(nch1, nch2, -2) |
==================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
taos> select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) > 1 order by ts limit 5
substring_index(var1, var2, 1) |
=================================
nov |
plat |
一二三 |
ab |
一二三a |
taos> select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
substring_index(var1, var2, 1) |
=================================
person |
novel |
一二三四五六七八九十 |
update |
prision |
taos> select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5
substring_index(var1, var2, -2) |
==================================
novel |
plate |
一二三abc |
一二三123321三二一 |
一二三abc |
taos> select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
substring_index(var1, var2, -2) |
==================================
person |
novel |
一二三四五六七八九十 |
update |
prision |
taos> select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) > 1 order by ts limit 5
substring_index(nch1, var2, 1) |
=================================
nov |
nov |
ab |
g |
一二三 |
taos> select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
substring_index(nch1, var2, 1) |
=================================
一二三四五六七八九十 |
update |
prision |
novel |
novel |
taos> select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5
substring_index(nch1, var2, -2) |
==================================
novel |
novel |
一二三abc |
一二三123321三二一 |
一二三abc |
taos> select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
substring_index(nch1, var2, -2) |
==================================
一二三四五六七八九十 |
update |
prision |
novel |
novel |
taos> select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) > 1 order by ts limit 5
substring_index(var1, nch2, 1) |
=================================
一二 |
a |
nov |
up |
p |
taos> select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
substring_index(var1, nch2, 1) |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
taos> select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5
substring_index(var1, nch2, -2) |
==================================
一二三abc |
c一二三abc |
bc一二三abc |
novel |
update |
taos> select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
substring_index(var1, nch2, -2) |
==================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
taos> select substring_index('a一二三a一二三bbcfp', nch2, 1) from ts_4893.meters where position(nch2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
substring_index('a一二三a一二三bbcfp', nch2, 1) |
========================================================
a一二三a一二三bbc |
a一二三a一二三bb |
a |
a |
a一二三a一二三bb |
taos> select substring_index('a一二三a一二三bbcfp', nch2, -1) from ts_4893.meters where position(nch2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
substring_index('a一二三a一二三bbcfp', nch2, -1) |
=========================================================
p |
fp |
二三bbcfp |
bbcfp |
fp |
taos> select substring_index('a一二三a一二三bbcfp', nch2, cast(id + 1 as int)) from ts_4893.meters where position(nch2 in 'a一二三a一二三bbcfp') = 0 order by ts limit 5
substring_index('a一二三a一二三bbcfp', nch2, cast(id + 1 a |
===================================================================
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
taos> select substring_index('a一二三a一二三bbcfp', var2, 1) from ts_4893.meters where position(var2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
substring_index('a一二三a一二三bbcfp', var2, 1) |
========================================================
a一二 |
a一二三a一二三 |
a一二三a一二三 |
a一二三a一二三 |
a |
taos> select substring_index('a一二三a一二三bbcfp', var2, -1) from ts_4893.meters where position(var2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
substring_index('a一二三a一二三bbcfp', var2, -1) |
=========================================================
一二三bbcfp |
cfp |
cfp |
cfp |
二三bbcfp |
taos> select substring_index('a一二三a一二三bbcfp', var2, cast(id + 1 as int)) from ts_4893.meters where position(var2 in 'a一二三a一二三bbcfp') = 0 order by ts limit 5
substring_index('a一二三a一二三bbcfp', var2, cast(id + 1 a |
===================================================================
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
a一二三a一二三bbcfp |
taos> select substring_index(nch1, '123', 1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
substring_index(nch1, '123', 1) |
==================================
一二三 |
一二三 |
一二三 |
一二三 |
一二三 |
taos> select substring_index(nch1, '123', -1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
substring_index(nch1, '123', -1) |
===================================
321三二一 |
321三二一 |
321三二一 |
321三二一 |
321三二一 |
taos> select substring_index(nch1, '123', id) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
substring_index(nch1, '123', id) |
===================================
一二三123321三二一 |
一二三123321三二一 |
一二三123321三二一 |
一二三123321三二一 |
一二三123321三二一 |
taos> select substring_index(var1, '123', 1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
substring_index(var1, '123', 1) |
==================================
一二三 |
一二三 |
一二三 |
一二三 |
一二三 |
taos> select substring_index(var1, '123', -1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
substring_index(var1, '123', -1) |
===================================
321三二一 |
321三二一 |
321三二一 |
321三二一 |
321三二一 |
taos> select substring_index(var1, '123', id) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
substring_index(var1, '123', id) |
===================================
一二三123321三二一 |
一二三123321三二一 |
一二三123321三二一 |
一二三123321三二一 |
一二三123321三二一 |
taos> select substring_index('www.taosdata.com', '.', 2)
substring_index('www.taosdata.com', '.', 2) |
==============================================
www.taosdata |
taos> select substring_index('www.taosdata.com', '.', -2)
substring_index('www.taosdata.com', '.', -2) |
===============================================
taosdata.com |
taos> select substring_index('中国.科学.www.taosdata.com', '.', 2)
substring_index('中国.科学.www.taosdata.com', '.', 2) |
============================================================
中国.科学 |
taos> select substring_index('北京。涛思。数据。科技', '。', 2)
substring_index('北京。涛思。数据。科技', '。', 2) |
=================================================================
北京。涛思 |
taos> select substring_index(nch1, 'a', 2) from ts_4893.d0 order by ts limit 10
substring_index(nch1, 'a', 2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
ag |
一二三四五六七八九十 |
novel |
ag |
taos> select substring_index(nch1, 'a', 2) from ts_4893.meters order by ts limit 10
substring_index(nch1, 'a', 2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
ag |
一二三四五六七八九十 |
novel |
ag |
taos> select substring_index(nch1, nch2, 2) from ts_4893.d0 order by ts limit 10
substring_index(nch1, nch2, 2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select substring_index(nch1, nch2, 2) from ts_4893.meters order by ts limit 10
substring_index(nch1, nch2, 2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select substring_index(nch1, var2, 2) from ts_4893.d0 order by ts limit 10
substring_index(nch1, var2, 2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select substring_index(nch1, var2, 2) from ts_4893.meters order by ts limit 10
substring_index(nch1, var2, 2) |
=================================
novel |
一二三四五六七八九十 |
update |
prision |
novel |
novel |
again |
一二三四五六七八九十 |
novel |
again |
taos> select substring_index(var1, nch2, 2) from ts_4893.d0 order by ts limit 10
substring_index(var1, nch2, 2) |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select substring_index(var1, nch2, 2) from ts_4893.meters order by ts limit 10
substring_index(var1, nch2, 2) |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select substring_index(var1, var2, 2) from ts_4893.d0 order by ts limit 10
substring_index(var1, var2, 2) |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select substring_index(var1, var2, 2) from ts_4893.meters order by ts limit 10
substring_index(var1, var2, 2) |
=================================
novel |
person |
novel |
plate |
一二三四五六七八九十 |
update |
prision |
person |
prision |
plate |
taos> select substring_index(null, '.', 2)
substring_index(null, '.', 2) |
================================
NULL |
taos> select substring_index('www.taosdata.com', null, 2)
substring_index('www.taosdata.com', null, 2) |
===============================================
NULL |
taos> select substring_index('www.taosdata.com', '.', 0)
substring_index('www.taosdata.com', '.', 0) |
==============================================
|
taos> select substring_index('www.taosdata.com', '.', null)
substring_index('www.taosdata.com', '.', null) |
=================================================
NULL |
taos> select substring_index('a.b.c', '.', 1)
substring_index('a.b.c', '.', 1) |
===================================
a |
taos> select substring_index('a.b.c', '.', 2)
substring_index('a.b.c', '.', 2) |
===================================
a.b |
taos> select substring_index('a.b.c', '.', -1)
substring_index('a.b.c', '.', -1) |
====================================
c |
taos> select substring_index('', '.', 1)
substring_index('', '.', 1) |
==============================
|
taos> select substring_index('apple.orange.banana', '.', 2)
substring_index('apple.orange.banana', '.', 2) |
=================================================
apple.orange |
taos> select substring_index('192.168.1.1', '.', 3)
substring_index('192.168.1.1', '.', 3) |
=========================================
192.168.1 |
taos> select substring_index('abc@xyz.com', '.', 5)
substring_index('abc@xyz.com', '.', 5) |
=========================================
abc@xyz.com |
taos> select substring_index('123456789', '.', 1)
substring_index('123456789', '.', 1) |
=======================================
123456789 |
taos> select substring_index('abcdef', ' ', 2)
substring_index('abcdef', ' ', 2) |
====================================
abcdef |
taos> select substring_index('ABCDEFG', '-', -1)
substring_index('ABCDEFG', '-', -1) |
======================================
ABCDEFG |
taos> select substring_index('apple', '.', -3)
substring_index('apple', '.', -3) |
====================================
apple |
taos> select substring_index(concat('apple', '.', 'orange', '.', 'banana'), '.', 2)
substring_index(concat('apple', '.', 'orange', '.', 'banana'), ' |
===================================================================
apple.orange |
taos> select substring_index('apple.orange.banana', '.', length('apple'))
substring_index('apple.orange.banana', '.', length('apple')) |
===============================================================
apple.orange.banana |
taos> select substring_index(upper('apple.orange.banana'), '.', 2)
substring_index(upper('apple.orange.banana'), '.', 2) |
========================================================
APPLE.ORANGE |
taos> select substring_index(trim(' apple.orange.banana '), '.', 2)
substring_index(trim(' apple.orange.banana '), '.', 2) |
===========================================================
apple.orange |
taos> select substring_index(concat('apple', '.', 'orange', '.', 'banana'), '.', 2)
substring_index(concat('apple', '.', 'orange', '.', 'banana'), ' |
===================================================================
apple.orange |
taos> select substring_index('apple.orange.banana', '.', length('apple'))
substring_index('apple.orange.banana', '.', length('apple')) |
===============================================================
apple.orange.banana |
taos> select substring_index(upper('apple.orange.banana'), '.', 2)
substring_index(upper('apple.orange.banana'), '.', 2) |
========================================================
APPLE.ORANGE |
taos> select substring_index(trim(' apple.orange.banana '), '.', 2)
substring_index(trim(' apple.orange.banana '), '.', 2) |
===========================================================
apple.orange |
taos> select name, substring_index(name, ' ', 1) from ts_4893.meters limit 1
name | substring_index(name, ' ', 1) |
==================================================================
lili | lili |
taos> select var1, substring_index(var1, '-', -1) from ts_4893.meters limit 1
var1 | substring_index(var1, '-', -1) |
==================================================================
novel | novel |
taos> select nch1, substring_index(nch1, ',', 3) from ts_4893.meters limit 1
nch1 | substring_index(nch1, ',', 3) |
==================================================================
novel | novel |
Can't render this file because it contains an unexpected character in line 2 and column 30.

File diff suppressed because it is too large Load Diff

View File

@ -1,785 +0,0 @@
taos> select TIMEDIFF(1,2)
timediff(1,2) |
========================
-1000 |
taos> select TIMEDIFF(2,1)
timediff(2,1) |
========================
1000 |
taos> select TIMEDIFF(1,2,1s)
timediff(1,2,1s) |
========================
-1 |
taos> select TIMEDIFF(2,1,1s)
timediff(2,1,1s) |
========================
1 |
taos> select TIMEDIFF(1,10000000,1m)
timediff(1,10000000,1m) |
==========================
-166666 |
taos> select TIMEDIFF(10000000,1,1m)
timediff(10000000,1,1m) |
==========================
166666 |
taos> select TIMEDIFF(1,10000000,1h)
timediff(1,10000000,1h) |
==========================
-2777 |
taos> select TIMEDIFF(10000000,1,1h)
timediff(10000000,1,1h) |
==========================
2777 |
taos> select TIMEDIFF(1,10000000,1d)
timediff(1,10000000,1d) |
==========================
-115 |
taos> select TIMEDIFF(10000000,1,1d)
timediff(10000000,1,1d) |
==========================
115 |
taos> select TIMEDIFF(1,10000000,1w)
timediff(1,10000000,1w) |
==========================
-16 |
taos> select TIMEDIFF(10000000,1,1w)
timediff(10000000,1,1w) |
==========================
16 |
taos> select TIMEDIFF(1724404450,1725095657)
timediff(1724404450,1725095657) |
==================================
-691207000 |
taos> select TIMEDIFF(1725095657,1724404450)
timediff(1725095657,1724404450) |
==================================
691207000 |
taos> select TIMEDIFF(1724404450,1725095657,1s)
timediff(1724404450,1725095657,1s) |
=====================================
-691207 |
taos> select TIMEDIFF(1725095657,1724404450,1s)
timediff(1725095657,1724404450,1s) |
=====================================
691207 |
taos> select TIMEDIFF(1724404450,1725095657,1m)
timediff(1724404450,1725095657,1m) |
=====================================
-11520 |
taos> select TIMEDIFF(1725095657,1724404450,1m)
timediff(1725095657,1724404450,1m) |
=====================================
11520 |
taos> select TIMEDIFF(1724404450,1725095657,1h)
timediff(1724404450,1725095657,1h) |
=====================================
-192 |
taos> select TIMEDIFF(1725095657,1724404450,1h)
timediff(1725095657,1724404450,1h) |
=====================================
192 |
taos> select TIMEDIFF(1724404450,1725095657,1d)
timediff(1724404450,1725095657,1d) |
=====================================
-8 |
taos> select TIMEDIFF(1725095657,1724404450,1d)
timediff(1725095657,1724404450,1d) |
=====================================
8 |
taos> select TIMEDIFF(1724404450,1725095657,1w)
timediff(1724404450,1725095657,1w) |
=====================================
-1 |
taos> select TIMEDIFF(1725095657,1724404450,1w)
timediff(1725095657,1724404450,1w) |
=====================================
1 |
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17')
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17') |
=========================================================
-691200000 |
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17')
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17') |
=========================================================
691200000 |
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s)
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s) |
=============================================================
-691200 |
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s)
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s) |
=============================================================
691200 |
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m)
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m) |
=============================================================
-11520 |
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m)
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m) |
=============================================================
11520 |
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h)
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h) |
=============================================================
-192 |
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h)
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h) |
=============================================================
192 |
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d)
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d) |
=============================================================
-8 |
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d)
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d) |
=============================================================
8 |
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w)
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w) |
=============================================================
-1 |
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w)
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w) |
=============================================================
1 |
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657)
timediff('2024-08-23 17:14:17', 1725095657) |
==============================================
-691200000 |
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17')
timediff(1725095657, '2024-08-23 17:14:17') |
==============================================
691200000 |
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1s)
timediff('2024-08-23 17:14:17', 1725095657, 1s) |
==================================================
-691200 |
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1s)
timediff(1725095657, '2024-08-23 17:14:17', 1s) |
==================================================
691200 |
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1m)
timediff('2024-08-23 17:14:17', 1725095657, 1m) |
==================================================
-11520 |
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1m)
timediff(1725095657, '2024-08-23 17:14:17', 1m) |
==================================================
11520 |
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1h)
timediff('2024-08-23 17:14:17', 1725095657, 1h) |
==================================================
-192 |
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1h)
timediff(1725095657, '2024-08-23 17:14:17', 1h) |
==================================================
192 |
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1d)
timediff('2024-08-23 17:14:17', 1725095657, 1d) |
==================================================
-8 |
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1d)
timediff(1725095657, '2024-08-23 17:14:17', 1d) |
==================================================
8 |
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1w)
timediff('2024-08-23 17:14:17', 1725095657, 1w) |
==================================================
-1 |
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1w)
timediff(1725095657, '2024-08-23 17:14:17', 1w) |
==================================================
1 |
taos> select TIMEDIFF(ts, ts) from ts_4893.meters order by ts limit 10
timediff(ts, ts) |
========================
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17') from ts_4893.meters order by ts limit 10
timediff(ts, '2024-08-31 17:14:17') |
======================================
-225095657000 |
-225092657000 |
-225089657000 |
-225086657000 |
-225083657000 |
-225080657000 |
-225077657000 |
-225074657000 |
-225071657000 |
-225068657000 |
taos> select TIMEDIFF('2024-08-31 17:14:17', ts) from ts_4893.meters order by ts limit 10
timediff('2024-08-31 17:14:17', ts) |
======================================
225095657000 |
225092657000 |
225089657000 |
225086657000 |
225083657000 |
225080657000 |
225077657000 |
225074657000 |
225071657000 |
225068657000 |
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1s) from ts_4893.meters order by ts limit 10
timediff(ts, '2024-08-31 17:14:17', 1s) |
==========================================
-225095657 |
-225092657 |
-225089657 |
-225086657 |
-225083657 |
-225080657 |
-225077657 |
-225074657 |
-225071657 |
-225068657 |
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1s) from ts_4893.meters order by ts limit 10
timediff('2024-08-31 17:14:17', ts, 1s) |
==========================================
225095657 |
225092657 |
225089657 |
225086657 |
225083657 |
225080657 |
225077657 |
225074657 |
225071657 |
225068657 |
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1m) from ts_4893.meters order by ts limit 10
timediff(ts, '2024-08-31 17:14:17', 1m) |
==========================================
-3751594 |
-3751544 |
-3751494 |
-3751444 |
-3751394 |
-3751344 |
-3751294 |
-3751244 |
-3751194 |
-3751144 |
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1m) from ts_4893.meters order by ts limit 10
timediff('2024-08-31 17:14:17', ts, 1m) |
==========================================
3751594 |
3751544 |
3751494 |
3751444 |
3751394 |
3751344 |
3751294 |
3751244 |
3751194 |
3751144 |
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1h) from ts_4893.meters order by ts limit 10
timediff(ts, '2024-08-31 17:14:17', 1h) |
==========================================
-62526 |
-62525 |
-62524 |
-62524 |
-62523 |
-62522 |
-62521 |
-62520 |
-62519 |
-62519 |
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1h) from ts_4893.meters order by ts limit 10
timediff('2024-08-31 17:14:17', ts, 1h) |
==========================================
62526 |
62525 |
62524 |
62524 |
62523 |
62522 |
62521 |
62520 |
62519 |
62519 |
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1d) from ts_4893.meters order by ts limit 10
timediff(ts, '2024-08-31 17:14:17', 1d) |
==========================================
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2604 |
-2604 |
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1d) from ts_4893.meters order by ts limit 10
timediff('2024-08-31 17:14:17', ts, 1d) |
==========================================
2605 |
2605 |
2605 |
2605 |
2605 |
2605 |
2605 |
2605 |
2604 |
2604 |
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1w) from ts_4893.meters order by ts limit 10
timediff(ts, '2024-08-31 17:14:17', 1w) |
==========================================
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1w) from ts_4893.meters order by ts limit 10
timediff('2024-08-31 17:14:17', ts, 1w) |
==========================================
372 |
372 |
372 |
372 |
372 |
372 |
372 |
372 |
372 |
372 |
taos> select TIMEDIFF(ts, 1725095657) from ts_4893.meters order by ts limit 10
timediff(ts, 1725095657) |
===========================
-225095657000 |
-225092657000 |
-225089657000 |
-225086657000 |
-225083657000 |
-225080657000 |
-225077657000 |
-225074657000 |
-225071657000 |
-225068657000 |
taos> select TIMEDIFF(1725095657, ts) from ts_4893.meters order by ts limit 10
timediff(1725095657, ts) |
===========================
225095657000 |
225092657000 |
225089657000 |
225086657000 |
225083657000 |
225080657000 |
225077657000 |
225074657000 |
225071657000 |
225068657000 |
taos> select TIMEDIFF(ts, 1725095657, 1s) from ts_4893.meters order by ts limit 10
timediff(ts, 1725095657, 1s) |
===============================
-225095657 |
-225092657 |
-225089657 |
-225086657 |
-225083657 |
-225080657 |
-225077657 |
-225074657 |
-225071657 |
-225068657 |
taos> select TIMEDIFF(1725095657, ts, 1s) from ts_4893.meters order by ts limit 10
timediff(1725095657, ts, 1s) |
===============================
225095657 |
225092657 |
225089657 |
225086657 |
225083657 |
225080657 |
225077657 |
225074657 |
225071657 |
225068657 |
taos> select TIMEDIFF(ts, 1725095657, 1m) from ts_4893.meters order by ts limit 10
timediff(ts, 1725095657, 1m) |
===============================
-3751594 |
-3751544 |
-3751494 |
-3751444 |
-3751394 |
-3751344 |
-3751294 |
-3751244 |
-3751194 |
-3751144 |
taos> select TIMEDIFF(1725095657, ts, 1m) from ts_4893.meters order by ts limit 10
timediff(1725095657, ts, 1m) |
===============================
3751594 |
3751544 |
3751494 |
3751444 |
3751394 |
3751344 |
3751294 |
3751244 |
3751194 |
3751144 |
taos> select TIMEDIFF(ts, 1725095657, 1h) from ts_4893.meters order by ts limit 10
timediff(ts, 1725095657, 1h) |
===============================
-62526 |
-62525 |
-62524 |
-62524 |
-62523 |
-62522 |
-62521 |
-62520 |
-62519 |
-62519 |
taos> select TIMEDIFF(1725095657, ts, 1h) from ts_4893.meters order by ts limit 10
timediff(1725095657, ts, 1h) |
===============================
62526 |
62525 |
62524 |
62524 |
62523 |
62522 |
62521 |
62520 |
62519 |
62519 |
taos> select TIMEDIFF(ts, 1725095657, 1d) from ts_4893.meters order by ts limit 10
timediff(ts, 1725095657, 1d) |
===============================
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2605 |
-2604 |
-2604 |
taos> select TIMEDIFF(1725095657, ts, 1d) from ts_4893.meters order by ts limit 10
timediff(1725095657, ts, 1d) |
===============================
2605 |
2605 |
2605 |
2605 |
2605 |
2605 |
2605 |
2605 |
2604 |
2604 |
taos> select TIMEDIFF(ts, 1725095657, 1w) from ts_4893.meters order by ts limit 10
timediff(ts, 1725095657, 1w) |
===============================
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
-372 |
taos> select TIMEDIFF(1725095657, ts, 1w) from ts_4893.meters order by ts limit 10
timediff(1725095657, ts, 1w) |
===============================
372 |
372 |
372 |
372 |
372 |
372 |
372 |
372 |
372 |
372 |
taos> select timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s)
timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s) |
============================================================
-10 |
taos> select timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s)
timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s) |
============================================================
31536000 |
taos> select timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a)
timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a) |
============================================================
3000 |
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m)
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m) |
============================================================
43200 |
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h)
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h) |
============================================================
720 |
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d)
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d) |
============================================================
30 |
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w)
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w) |
============================================================
4 |
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00')
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00') |
=========================================================
2592000000 |
taos> select timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s)
timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s) |
===========================================================
2592000 |
taos> select timediff('2022-01-31', '2022-01-01',1s)
timediff('2022-01-31', '2022-01-01',1s) |
==========================================
2592000 |
taos> select timediff(1720769589, 1720769529, 1s)
timediff(1720769589, 1720769529, 1s) |
=======================================
60 |
taos> select timediff(1720769589, '2022-01-01 08:00:00', 1s)
timediff(1720769589, '2022-01-01 08:00:00', 1s) |
==================================================
79774389 |
taos> select timediff(1720769589123, 1720769529123, 1s)
timediff(1720769589123, 1720769529123, 1s) |
=============================================
60 |
taos> select timediff(1720769589231, '2022-01-01 08:00:00', 1s)
timediff(1720769589231, '2022-01-01 08:00:00', 1s) |
=====================================================
79774389 |
taos> select timediff('2022-01-01 08:00:00', 1720769589, 1s)
timediff('2022-01-01 08:00:00', 1720769589, 1s) |
==================================================
-79774389 |
taos> select timediff('2022-01-01 08:00:00', 1720769589123, 1s)
timediff('2022-01-01 08:00:00', 1720769589123, 1s) |
=====================================================
-79774389 |
taos> select timediff(ts, 1720769589123, 1a) from ts_4893.d0 order by ts limit 10
timediff(ts, 1720769589123, 1a) |
==================================
-220769589123 |
-220766589123 |
-220763589123 |
-220760589123 |
-220757589123 |
-220754589123 |
-220751589123 |
-220748589123 |
-220745589123 |
-220742589123 |
taos> select timediff(ts, 1720769589123, 1a) from ts_4893.meters order by ts limit 10
timediff(ts, 1720769589123, 1a) |
==================================
-220769589123 |
-220766589123 |
-220763589123 |
-220760589123 |
-220757589123 |
-220754589123 |
-220751589123 |
-220748589123 |
-220745589123 |
-220742589123 |
taos> select timediff(null, '2022-01-01 08:00:01', 1s)
timediff(null, '2022-01-01 08:00:01', 1s) |
============================================
NULL |
taos> select timediff('20220131', '20220101', 1s)
timediff('20220131', '20220101', 1s) |
=======================================
NULL |
taos> select timediff('01/31/22', '01/01/22', 1s)
timediff('01/31/22', '01/01/22', 1s) |
=======================================
NULL |
taos> select timediff('22/01/31', '22/01/01')
timediff('22/01/31', '22/01/01') |
===================================
NULL |
taos> select timediff('22/01/31', '22/01/01', 1s)
timediff('22/01/31', '22/01/01', 1s) |
=======================================
NULL |
taos> select timediff('31-JAN-22', '01-JAN-22', 1s)
timediff('31-JAN-22', '01-JAN-22', 1s) |
=========================================
NULL |
taos> select timediff('2022/01/31', '2022/01/01', 1s)
timediff('2022/01/31', '2022/01/01', 1s) |
===========================================
NULL |
taos> select timediff('2022-01-01 08:00:00', null, 1s)
timediff('2022-01-01 08:00:00', null, 1s) |
============================================
NULL |
taos> select timediff('www', 'ttt')
timediff('www', 'ttt') |
=========================
NULL |
taos> select timediff(ts, ts) from ts_4893.meters limit 1
timediff(ts, ts) |
========================
0 |
taos> select timediff(ts, ts - 1d) from ts_4893.meters limit 1
timediff(ts, ts - 1d) |
========================
86400000 |
taos> select timediff(ts, '00:00:00') from ts_4893.meters limit 1
timediff(ts, '00:00:00') |
===========================
NULL |
taos> select timediff(ts, null) from ts_4893.meters limit 1
timediff(ts, null) |
========================
NULL |
taos> select timediff('25:61:61', ts) from ts_4893.meters limit 1
timediff('25:61:61', ts) |
===========================
NULL |
taos> select timediff('invalid_format', ts) from ts_4893.meters limit 1
timediff('invalid_format', ts) |
=================================
NULL |
taos> select timediff(name, ts) from ts_4893.meters limit 2
timediff(name, ts) |
========================
NULL |
NULL |
taos> select timediff('string_value', 'another_string') from ts_4893.meters limit 1
timediff('string_value', 'another_string') |
=============================================
NULL |
1 taos> select TIMEDIFF(1,2)
2 timediff(1,2) |
3 ========================
4 -1000 |
5 taos> select TIMEDIFF(2,1)
6 timediff(2,1) |
7 ========================
8 1000 |
9 taos> select TIMEDIFF(1,2,1s)
10 timediff(1,2,1s) |
11 ========================
12 -1 |
13 taos> select TIMEDIFF(2,1,1s)
14 timediff(2,1,1s) |
15 ========================
16 1 |
17 taos> select TIMEDIFF(1,10000000,1m)
18 timediff(1,10000000,1m) |
19 ==========================
20 -166666 |
21 taos> select TIMEDIFF(10000000,1,1m)
22 timediff(10000000,1,1m) |
23 ==========================
24 166666 |
25 taos> select TIMEDIFF(1,10000000,1h)
26 timediff(1,10000000,1h) |
27 ==========================
28 -2777 |
29 taos> select TIMEDIFF(10000000,1,1h)
30 timediff(10000000,1,1h) |
31 ==========================
32 2777 |
33 taos> select TIMEDIFF(1,10000000,1d)
34 timediff(1,10000000,1d) |
35 ==========================
36 -115 |
37 taos> select TIMEDIFF(10000000,1,1d)
38 timediff(10000000,1,1d) |
39 ==========================
40 115 |
41 taos> select TIMEDIFF(1,10000000,1w)
42 timediff(1,10000000,1w) |
43 ==========================
44 -16 |
45 taos> select TIMEDIFF(10000000,1,1w)
46 timediff(10000000,1,1w) |
47 ==========================
48 16 |
49 taos> select TIMEDIFF(1724404450,1725095657)
50 timediff(1724404450,1725095657) |
51 ==================================
52 -691207000 |
53 taos> select TIMEDIFF(1725095657,1724404450)
54 timediff(1725095657,1724404450) |
55 ==================================
56 691207000 |
57 taos> select TIMEDIFF(1724404450,1725095657,1s)
58 timediff(1724404450,1725095657,1s) |
59 =====================================
60 -691207 |
61 taos> select TIMEDIFF(1725095657,1724404450,1s)
62 timediff(1725095657,1724404450,1s) |
63 =====================================
64 691207 |
65 taos> select TIMEDIFF(1724404450,1725095657,1m)
66 timediff(1724404450,1725095657,1m) |
67 =====================================
68 -11520 |
69 taos> select TIMEDIFF(1725095657,1724404450,1m)
70 timediff(1725095657,1724404450,1m) |
71 =====================================
72 11520 |
73 taos> select TIMEDIFF(1724404450,1725095657,1h)
74 timediff(1724404450,1725095657,1h) |
75 =====================================
76 -192 |
77 taos> select TIMEDIFF(1725095657,1724404450,1h)
78 timediff(1725095657,1724404450,1h) |
79 =====================================
80 192 |
81 taos> select TIMEDIFF(1724404450,1725095657,1d)
82 timediff(1724404450,1725095657,1d) |
83 =====================================
84 -8 |
85 taos> select TIMEDIFF(1725095657,1724404450,1d)
86 timediff(1725095657,1724404450,1d) |
87 =====================================
88 8 |
89 taos> select TIMEDIFF(1724404450,1725095657,1w)
90 timediff(1724404450,1725095657,1w) |
91 =====================================
92 -1 |
93 taos> select TIMEDIFF(1725095657,1724404450,1w)
94 timediff(1725095657,1724404450,1w) |
95 =====================================
96 1 |
97 taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17')
98 timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17') |
99 =========================================================
100 -691200000 |
101 taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17')
102 timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17') |
103 =========================================================
104 691200000 |
105 taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s)
106 timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s) |
107 =============================================================
108 -691200 |
109 taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s)
110 timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s) |
111 =============================================================
112 691200 |
113 taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m)
114 timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m) |
115 =============================================================
116 -11520 |
117 taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m)
118 timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m) |
119 =============================================================
120 11520 |
121 taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h)
122 timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h) |
123 =============================================================
124 -192 |
125 taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h)
126 timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h) |
127 =============================================================
128 192 |
129 taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d)
130 timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d) |
131 =============================================================
132 -8 |
133 taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d)
134 timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d) |
135 =============================================================
136 8 |
137 taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w)
138 timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w) |
139 =============================================================
140 -1 |
141 taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w)
142 timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w) |
143 =============================================================
144 1 |
145 taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657)
146 timediff('2024-08-23 17:14:17', 1725095657) |
147 ==============================================
148 -691200000 |
149 taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17')
150 timediff(1725095657, '2024-08-23 17:14:17') |
151 ==============================================
152 691200000 |
153 taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1s)
154 timediff('2024-08-23 17:14:17', 1725095657, 1s) |
155 ==================================================
156 -691200 |
157 taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1s)
158 timediff(1725095657, '2024-08-23 17:14:17', 1s) |
159 ==================================================
160 691200 |
161 taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1m)
162 timediff('2024-08-23 17:14:17', 1725095657, 1m) |
163 ==================================================
164 -11520 |
165 taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1m)
166 timediff(1725095657, '2024-08-23 17:14:17', 1m) |
167 ==================================================
168 11520 |
169 taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1h)
170 timediff('2024-08-23 17:14:17', 1725095657, 1h) |
171 ==================================================
172 -192 |
173 taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1h)
174 timediff(1725095657, '2024-08-23 17:14:17', 1h) |
175 ==================================================
176 192 |
177 taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1d)
178 timediff('2024-08-23 17:14:17', 1725095657, 1d) |
179 ==================================================
180 -8 |
181 taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1d)
182 timediff(1725095657, '2024-08-23 17:14:17', 1d) |
183 ==================================================
184 8 |
185 taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1w)
186 timediff('2024-08-23 17:14:17', 1725095657, 1w) |
187 ==================================================
188 -1 |
189 taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1w)
190 timediff(1725095657, '2024-08-23 17:14:17', 1w) |
191 ==================================================
192 1 |
193 taos> select TIMEDIFF(ts, ts) from ts_4893.meters order by ts limit 10
194 timediff(ts, ts) |
195 ========================
196 0 |
197 0 |
198 0 |
199 0 |
200 0 |
201 0 |
202 0 |
203 0 |
204 0 |
205 0 |
206 taos> select TIMEDIFF(ts, '2024-08-31 17:14:17') from ts_4893.meters order by ts limit 10
207 timediff(ts, '2024-08-31 17:14:17') |
208 ======================================
209 -225095657000 |
210 -225092657000 |
211 -225089657000 |
212 -225086657000 |
213 -225083657000 |
214 -225080657000 |
215 -225077657000 |
216 -225074657000 |
217 -225071657000 |
218 -225068657000 |
219 taos> select TIMEDIFF('2024-08-31 17:14:17', ts) from ts_4893.meters order by ts limit 10
220 timediff('2024-08-31 17:14:17', ts) |
221 ======================================
222 225095657000 |
223 225092657000 |
224 225089657000 |
225 225086657000 |
226 225083657000 |
227 225080657000 |
228 225077657000 |
229 225074657000 |
230 225071657000 |
231 225068657000 |
232 taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1s) from ts_4893.meters order by ts limit 10
233 timediff(ts, '2024-08-31 17:14:17', 1s) |
234 ==========================================
235 -225095657 |
236 -225092657 |
237 -225089657 |
238 -225086657 |
239 -225083657 |
240 -225080657 |
241 -225077657 |
242 -225074657 |
243 -225071657 |
244 -225068657 |
245 taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1s) from ts_4893.meters order by ts limit 10
246 timediff('2024-08-31 17:14:17', ts, 1s) |
247 ==========================================
248 225095657 |
249 225092657 |
250 225089657 |
251 225086657 |
252 225083657 |
253 225080657 |
254 225077657 |
255 225074657 |
256 225071657 |
257 225068657 |
258 taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1m) from ts_4893.meters order by ts limit 10
259 timediff(ts, '2024-08-31 17:14:17', 1m) |
260 ==========================================
261 -3751594 |
262 -3751544 |
263 -3751494 |
264 -3751444 |
265 -3751394 |
266 -3751344 |
267 -3751294 |
268 -3751244 |
269 -3751194 |
270 -3751144 |
271 taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1m) from ts_4893.meters order by ts limit 10
272 timediff('2024-08-31 17:14:17', ts, 1m) |
273 ==========================================
274 3751594 |
275 3751544 |
276 3751494 |
277 3751444 |
278 3751394 |
279 3751344 |
280 3751294 |
281 3751244 |
282 3751194 |
283 3751144 |
284 taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1h) from ts_4893.meters order by ts limit 10
285 timediff(ts, '2024-08-31 17:14:17', 1h) |
286 ==========================================
287 -62526 |
288 -62525 |
289 -62524 |
290 -62524 |
291 -62523 |
292 -62522 |
293 -62521 |
294 -62520 |
295 -62519 |
296 -62519 |
297 taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1h) from ts_4893.meters order by ts limit 10
298 timediff('2024-08-31 17:14:17', ts, 1h) |
299 ==========================================
300 62526 |
301 62525 |
302 62524 |
303 62524 |
304 62523 |
305 62522 |
306 62521 |
307 62520 |
308 62519 |
309 62519 |
310 taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1d) from ts_4893.meters order by ts limit 10
311 timediff(ts, '2024-08-31 17:14:17', 1d) |
312 ==========================================
313 -2605 |
314 -2605 |
315 -2605 |
316 -2605 |
317 -2605 |
318 -2605 |
319 -2605 |
320 -2605 |
321 -2604 |
322 -2604 |
323 taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1d) from ts_4893.meters order by ts limit 10
324 timediff('2024-08-31 17:14:17', ts, 1d) |
325 ==========================================
326 2605 |
327 2605 |
328 2605 |
329 2605 |
330 2605 |
331 2605 |
332 2605 |
333 2605 |
334 2604 |
335 2604 |
336 taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1w) from ts_4893.meters order by ts limit 10
337 timediff(ts, '2024-08-31 17:14:17', 1w) |
338 ==========================================
339 -372 |
340 -372 |
341 -372 |
342 -372 |
343 -372 |
344 -372 |
345 -372 |
346 -372 |
347 -372 |
348 -372 |
349 taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1w) from ts_4893.meters order by ts limit 10
350 timediff('2024-08-31 17:14:17', ts, 1w) |
351 ==========================================
352 372 |
353 372 |
354 372 |
355 372 |
356 372 |
357 372 |
358 372 |
359 372 |
360 372 |
361 372 |
362 taos> select TIMEDIFF(ts, 1725095657) from ts_4893.meters order by ts limit 10
363 timediff(ts, 1725095657) |
364 ===========================
365 -225095657000 |
366 -225092657000 |
367 -225089657000 |
368 -225086657000 |
369 -225083657000 |
370 -225080657000 |
371 -225077657000 |
372 -225074657000 |
373 -225071657000 |
374 -225068657000 |
375 taos> select TIMEDIFF(1725095657, ts) from ts_4893.meters order by ts limit 10
376 timediff(1725095657, ts) |
377 ===========================
378 225095657000 |
379 225092657000 |
380 225089657000 |
381 225086657000 |
382 225083657000 |
383 225080657000 |
384 225077657000 |
385 225074657000 |
386 225071657000 |
387 225068657000 |
388 taos> select TIMEDIFF(ts, 1725095657, 1s) from ts_4893.meters order by ts limit 10
389 timediff(ts, 1725095657, 1s) |
390 ===============================
391 -225095657 |
392 -225092657 |
393 -225089657 |
394 -225086657 |
395 -225083657 |
396 -225080657 |
397 -225077657 |
398 -225074657 |
399 -225071657 |
400 -225068657 |
401 taos> select TIMEDIFF(1725095657, ts, 1s) from ts_4893.meters order by ts limit 10
402 timediff(1725095657, ts, 1s) |
403 ===============================
404 225095657 |
405 225092657 |
406 225089657 |
407 225086657 |
408 225083657 |
409 225080657 |
410 225077657 |
411 225074657 |
412 225071657 |
413 225068657 |
414 taos> select TIMEDIFF(ts, 1725095657, 1m) from ts_4893.meters order by ts limit 10
415 timediff(ts, 1725095657, 1m) |
416 ===============================
417 -3751594 |
418 -3751544 |
419 -3751494 |
420 -3751444 |
421 -3751394 |
422 -3751344 |
423 -3751294 |
424 -3751244 |
425 -3751194 |
426 -3751144 |
427 taos> select TIMEDIFF(1725095657, ts, 1m) from ts_4893.meters order by ts limit 10
428 timediff(1725095657, ts, 1m) |
429 ===============================
430 3751594 |
431 3751544 |
432 3751494 |
433 3751444 |
434 3751394 |
435 3751344 |
436 3751294 |
437 3751244 |
438 3751194 |
439 3751144 |
440 taos> select TIMEDIFF(ts, 1725095657, 1h) from ts_4893.meters order by ts limit 10
441 timediff(ts, 1725095657, 1h) |
442 ===============================
443 -62526 |
444 -62525 |
445 -62524 |
446 -62524 |
447 -62523 |
448 -62522 |
449 -62521 |
450 -62520 |
451 -62519 |
452 -62519 |
453 taos> select TIMEDIFF(1725095657, ts, 1h) from ts_4893.meters order by ts limit 10
454 timediff(1725095657, ts, 1h) |
455 ===============================
456 62526 |
457 62525 |
458 62524 |
459 62524 |
460 62523 |
461 62522 |
462 62521 |
463 62520 |
464 62519 |
465 62519 |
466 taos> select TIMEDIFF(ts, 1725095657, 1d) from ts_4893.meters order by ts limit 10
467 timediff(ts, 1725095657, 1d) |
468 ===============================
469 -2605 |
470 -2605 |
471 -2605 |
472 -2605 |
473 -2605 |
474 -2605 |
475 -2605 |
476 -2605 |
477 -2604 |
478 -2604 |
479 taos> select TIMEDIFF(1725095657, ts, 1d) from ts_4893.meters order by ts limit 10
480 timediff(1725095657, ts, 1d) |
481 ===============================
482 2605 |
483 2605 |
484 2605 |
485 2605 |
486 2605 |
487 2605 |
488 2605 |
489 2605 |
490 2604 |
491 2604 |
492 taos> select TIMEDIFF(ts, 1725095657, 1w) from ts_4893.meters order by ts limit 10
493 timediff(ts, 1725095657, 1w) |
494 ===============================
495 -372 |
496 -372 |
497 -372 |
498 -372 |
499 -372 |
500 -372 |
501 -372 |
502 -372 |
503 -372 |
504 -372 |
505 taos> select TIMEDIFF(1725095657, ts, 1w) from ts_4893.meters order by ts limit 10
506 timediff(1725095657, ts, 1w) |
507 ===============================
508 372 |
509 372 |
510 372 |
511 372 |
512 372 |
513 372 |
514 372 |
515 372 |
516 372 |
517 372 |
518 taos> select timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s)
519 timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s) |
520 ============================================================
521 -10 |
522 taos> select timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s)
523 timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s) |
524 ============================================================
525 31536000 |
526 taos> select timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a)
527 timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a) |
528 ============================================================
529 3000 |
530 taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m)
531 timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m) |
532 ============================================================
533 43200 |
534 taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h)
535 timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h) |
536 ============================================================
537 720 |
538 taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d)
539 timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d) |
540 ============================================================
541 30 |
542 taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w)
543 timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w) |
544 ============================================================
545 4 |
546 taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00')
547 timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00') |
548 =========================================================
549 2592000000 |
550 taos> select timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s)
551 timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s) |
552 ===========================================================
553 2592000 |
554 taos> select timediff('2022-01-31', '2022-01-01',1s)
555 timediff('2022-01-31', '2022-01-01',1s) |
556 ==========================================
557 2592000 |
558 taos> select timediff(1720769589, 1720769529, 1s)
559 timediff(1720769589, 1720769529, 1s) |
560 =======================================
561 60 |
562 taos> select timediff(1720769589, '2022-01-01 08:00:00', 1s)
563 timediff(1720769589, '2022-01-01 08:00:00', 1s) |
564 ==================================================
565 79774389 |
566 taos> select timediff(1720769589123, 1720769529123, 1s)
567 timediff(1720769589123, 1720769529123, 1s) |
568 =============================================
569 60 |
570 taos> select timediff(1720769589231, '2022-01-01 08:00:00', 1s)
571 timediff(1720769589231, '2022-01-01 08:00:00', 1s) |
572 =====================================================
573 79774389 |
574 taos> select timediff('2022-01-01 08:00:00', 1720769589, 1s)
575 timediff('2022-01-01 08:00:00', 1720769589, 1s) |
576 ==================================================
577 -79774389 |
578 taos> select timediff('2022-01-01 08:00:00', 1720769589123, 1s)
579 timediff('2022-01-01 08:00:00', 1720769589123, 1s) |
580 =====================================================
581 -79774389 |
582 taos> select timediff(ts, 1720769589123, 1a) from ts_4893.d0 order by ts limit 10
583 timediff(ts, 1720769589123, 1a) |
584 ==================================
585 -220769589123 |
586 -220766589123 |
587 -220763589123 |
588 -220760589123 |
589 -220757589123 |
590 -220754589123 |
591 -220751589123 |
592 -220748589123 |
593 -220745589123 |
594 -220742589123 |
595 taos> select timediff(ts, 1720769589123, 1a) from ts_4893.meters order by ts limit 10
596 timediff(ts, 1720769589123, 1a) |
597 ==================================
598 -220769589123 |
599 -220766589123 |
600 -220763589123 |
601 -220760589123 |
602 -220757589123 |
603 -220754589123 |
604 -220751589123 |
605 -220748589123 |
606 -220745589123 |
607 -220742589123 |
608 taos> select timediff(null, '2022-01-01 08:00:01', 1s)
609 timediff(null, '2022-01-01 08:00:01', 1s) |
610 ============================================
611 NULL |
612 taos> select timediff('20220131', '20220101', 1s)
613 timediff('20220131', '20220101', 1s) |
614 =======================================
615 NULL |
616 taos> select timediff('01/31/22', '01/01/22', 1s)
617 timediff('01/31/22', '01/01/22', 1s) |
618 =======================================
619 NULL |
620 taos> select timediff('22/01/31', '22/01/01')
621 timediff('22/01/31', '22/01/01') |
622 ===================================
623 NULL |
624 taos> select timediff('22/01/31', '22/01/01', 1s)
625 timediff('22/01/31', '22/01/01', 1s) |
626 =======================================
627 NULL |
628 taos> select timediff('31-JAN-22', '01-JAN-22', 1s)
629 timediff('31-JAN-22', '01-JAN-22', 1s) |
630 =========================================
631 NULL |
632 taos> select timediff('2022/01/31', '2022/01/01', 1s)
633 timediff('2022/01/31', '2022/01/01', 1s) |
634 ===========================================
635 NULL |
636 taos> select timediff('2022-01-01 08:00:00', null, 1s)
637 timediff('2022-01-01 08:00:00', null, 1s) |
638 ============================================
639 NULL |
640 taos> select timediff('www', 'ttt')
641 timediff('www', 'ttt') |
642 =========================
643 NULL |
644 taos> select timediff(ts, ts) from ts_4893.meters limit 1
645 timediff(ts, ts) |
646 ========================
647 0 |
648 taos> select timediff(ts, ts - 1d) from ts_4893.meters limit 1
649 timediff(ts, ts - 1d) |
650 ========================
651 86400000 |
652 taos> select timediff(ts, '00:00:00') from ts_4893.meters limit 1
653 timediff(ts, '00:00:00') |
654 ===========================
655 NULL |
656 taos> select timediff(ts, null) from ts_4893.meters limit 1
657 timediff(ts, null) |
658 ========================
659 NULL |
660 taos> select timediff('25:61:61', ts) from ts_4893.meters limit 1
661 timediff('25:61:61', ts) |
662 ===========================
663 NULL |
664 taos> select timediff('invalid_format', ts) from ts_4893.meters limit 1
665 timediff('invalid_format', ts) |
666 =================================
667 NULL |
668 taos> select timediff(name, ts) from ts_4893.meters limit 2
669 timediff(name, ts) |
670 ========================
671 NULL |
672 NULL |
673 taos> select timediff('string_value', 'another_string') from ts_4893.meters limit 1
674 timediff('string_value', 'another_string') |
675 =============================================
676 NULL |

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

472
tests/army/query/function/ans/trunc.csv Executable file → Normal file
View File

@ -1,129 +1,343 @@
10.550000000000001
10.550000000000001 taos> select TRUNCATE(10.55, 3)
10.500000000000000 truncate(10.55, 3) |
10.000000000000000 ============================
10.000000000000000 10.550000000000001 |
0.000000000000000
-10.500000000000000 taos> select TRUNCATE(10.55, 2)
99 truncate(10.55, 2) |
11.500000000000000 ============================
1.231230000000000e+02 10.550000000000001 |
1.200000000000000e+08
8.765432100000000e+07 taos> select TRUNCATE(10.55, 1)
8.765432109999999e+07 truncate(10.55, 1) |
8.765432112000000e+07 ============================
8.765432112300000e+07 10.500000000000000 |
8.765432112340000e+07
8.765432112345000e+07 taos> select TRUNCATE(10.55, 0)
8.765432112345600e+07 truncate(10.55, 0) |
8.765432112345670e+07 ============================
8.765432112345679e+07 10.000000000000000 |
8.765432112345679e+07
10.0000000 taos> select TRUNCATE(10.55, -1)
8.5000000 truncate(10.55, -1) |
9.7900000 ============================
11.2329998 10.000000000000000 |
10.7060003
8.5080004 taos> select TRUNCATE(10.55, -10)
9.5959997 truncate(10.55, -10) |
10.9619999 ============================
11.2259998 0.000000000000000 |
10.3369999
10.6000004 taos> select TRUNCATE(-10.55, 1)
8.5000000 truncate(-10.55, 1) |
9.6999998 ============================
11.1999998 -10.500000000000000 |
10.6999998
8.5000000 taos> select TRUNCATE(99, 1)
9.5000000 truncate(99, 1) |
10.8999996 ========================
11.1999998 99 |
10.3000002
10.550000000000001 taos> select TRUNCATE(10.55, 1) + 1
10.550000000000001 truncate(10.55, 1) + 1 |
10.500000000000000 ============================
10.000000000000000 11.500000000000000 |
10.000000000000000
0.000000000000000 taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123.123456789, 9), 8), 7), 6), 5), 4), 3)
-10.500000000000000 truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
99 ===================================================================
11.500000000000000 1.231230000000000e+02 |
1.231230000000000e+02
1.200000000000000e+08 taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
8.765432100000000e+07 truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
8.765432109999999e+07 ===================================================================
8.765432112000000e+07 1.200000000000000e+08 |
8.765432112300000e+07
8.765432112340000e+07 taos> select TRUNCATE(87654321.123456789, id) from ts_4893.meters order by ts limit 10
8.765432112345000e+07 truncate(87654321.123456789, id) |
8.765432112345600e+07 ===================================
8.765432112345670e+07 8.765432100000000e+07 |
8.765432112345679e+07 8.765432109999999e+07 |
8.765432112345679e+07 8.765432112000000e+07 |
10.0000000 8.765432112300000e+07 |
8.5000000 8.765432112340000e+07 |
9.7900000 8.765432112345000e+07 |
11.2329998 8.765432112345600e+07 |
10.7060003 8.765432112345670e+07 |
8.5080004 8.765432112345679e+07 |
9.5959997 8.765432112345679e+07 |
10.9619999
11.2259998 taos> select TRUNCATE(current, id) from ts_4893.meters order by ts limit 10
10.3369999 truncate(current, id) |
10.6000004 ========================
8.5000000 1.0000000e+01 |
9.6999998 8.5000000e+00 |
11.1999998 9.7900000e+00 |
10.6999998 1.1233000e+01 |
8.5000000 1.0706000e+01 |
9.5000000 8.5080004e+00 |
10.8999996 9.5959997e+00 |
11.1999998 1.0962000e+01 |
10.3000002 1.1226000e+01 |
99.99 1.0337000e+01 |
99.99
99.9 taos> select TRUNCATE(current, 1) from ts_4893.meters order by ts limit 10
99 truncate(current, 1) |
90 =======================
0 10.6000004 |
99 8.5000000 |
10.6 9.6999998 |
8.5 11.1999998 |
9.7 10.6999998 |
11.2 8.5000000 |
10.7 9.5000000 |
8.5 10.8999996 |
9.5 11.1999998 |
10.9 10.3000002 |
11.2
10.3 taos> select TRUNC(10.55, 3)
10.6 trunc(10.55, 3) |
8.5 ============================
9.7 10.550000000000001 |
11.2
10.7 taos> select TRUNC(10.55, 2)
8.5 trunc(10.55, 2) |
9.5 ============================
10.9 10.550000000000001 |
11.2
10.3 taos> select TRUNC(10.55, 1)
10.6 trunc(10.55, 1) |
8.5 ============================
9.7 10.500000000000000 |
11.2
10.7 taos> select TRUNC(10.55, 0)
8.5 trunc(10.55, 0) |
9.5 ============================
10.9 10.000000000000000 |
11.2
10.3 taos> select TRUNC(10.55, -1)
10.6 trunc(10.55, -1) |
8.5 ============================
9.7 10.000000000000000 |
11.2
10.7 taos> select TRUNC(10.55, -10)
8.5 trunc(10.55, -10) |
9.5 ============================
10.9 0.000000000000000 |
11.2
10.3 taos> select TRUNC(-10.55, 1)
trunc(-10.55, 1) |
============================
-10.500000000000000 |
taos> select TRUNC(99, 1)
trunc(99, 1) |
========================
99 |
taos> select TRUNC(10.55, 1) + 1
trunc(10.55, 1) + 1 |
============================
11.500000000000000 |
taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123.123456789, 9), 8), 7), 6), 5), 4), 3)
trunc(trunc(trunc(trunc(trunc(trunc(trunc(123.123456789, 9), 8), |
===================================================================
1.231230000000000e+02 |
taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
trunc(trunc(trunc(trunc(trunc(trunc(trunc(123456789.123456789, - |
===================================================================
1.200000000000000e+08 |
taos> select TRUNC(87654321.123456789, id) from ts_4893.meters order by ts limit 10
trunc(87654321.123456789, id) |
================================
8.765432100000000e+07 |
8.765432109999999e+07 |
8.765432112000000e+07 |
8.765432112300000e+07 |
8.765432112340000e+07 |
8.765432112345000e+07 |
8.765432112345600e+07 |
8.765432112345670e+07 |
8.765432112345679e+07 |
8.765432112345679e+07 |
taos> select TRUNC(current, id) from ts_4893.meters order by ts limit 10
trunc(current, id) |
=======================
10.0000000 |
8.5000000 |
9.7900000 |
11.2329998 |
10.7060003 |
8.5080004 |
9.5959997 |
10.9619999 |
11.2259998 |
10.3369999 |
taos> select TRUNC(current, 1) from ts_4893.meters order by ts limit 10
trunc(current, 1) |
=======================
10.6000004 |
8.5000000 |
9.6999998 |
11.1999998 |
10.6999998 |
8.5000000 |
9.5000000 |
10.8999996 |
11.1999998 |
10.3000002 |
taos> select truncate(99.99, 3)
truncate(99.99, 3) |
============================
99.989999999999995 |
taos> select truncate(99.99, 2)
truncate(99.99, 2) |
============================
99.989999999999995 |
taos> select truncate(99.99, 1)
truncate(99.99, 1) |
============================
99.900000000000006 |
taos> select truncate(99.99, 0)
truncate(99.99, 0) |
============================
99.000000000000000 |
taos> select truncate(99.99, -1)
truncate(99.99, -1) |
============================
90.000000000000000 |
taos> select truncate(99.99, -10)
truncate(99.99, -10) |
============================
0.000000000000000 |
taos> select truncate(99, 1)
truncate(99, 1) |
========================
99 |
taos> select truncate(current, 1) from ts_4893.d0 order by ts limit 10
truncate(current, 1) |
=======================
10.6000004 |
8.5000000 |
9.6999998 |
11.1999998 |
10.6999998 |
8.5000000 |
9.5000000 |
10.8999996 |
11.1999998 |
10.3000002 |
taos> select truncate(current, 1) from ts_4893.meters order by ts limit 10
truncate(current, 1) |
=======================
10.6000004 |
8.5000000 |
9.6999998 |
11.1999998 |
10.6999998 |
8.5000000 |
9.5000000 |
10.8999996 |
11.1999998 |
10.3000002 |
taos> select truncate(99.99, null)
truncate(99.99, null) |
============================
NULL |
taos> select truncate(null, 3)
truncate(null, 3) |
====================
NULL |
taos> select truncate(1.0001, 3)
truncate(1.0001, 3) |
============================
1.000000000000000 |
taos> select truncate(2.71828, 4)
truncate(2.71828, 4) |
============================
2.718200000000000 |
taos> select truncate(3.14159, 2)
truncate(3.14159, 2) |
============================
3.140000000000000 |
taos> select truncate(100.9876, 2)
truncate(100.9876, 2) |
============================
100.980000000000004 |
taos> select truncate(99999999999999.9999, 2)
truncate(99999999999999.9999, 2) |
===================================
1.000000000000000e+14 |
taos> select truncate(-5.678, 2)
truncate(-5.678, 2) |
============================
-5.670000000000000 |
taos> select truncate(voltage, 2) from ts_4893.meters limit 1
truncate(voltage, 2) |
=======================
221 |
taos> select truncate(current, 1) from ts_4893.meters limit 1
truncate(current, 1) |
=======================
10.6000004 |
taos> select truncate(phase, 3) from ts_4893.meters limit 1
truncate(phase, 3) |
=======================
0.5080000 |
taos> select truncate(voltage + current, 2) from ts_4893.meters limit 1
truncate(voltage + current, 2) |
=================================
2.316400000000000e+02 |
taos> select truncate(voltage, -1) from ts_4893.meters limit 1
truncate(voltage, -1) |
========================
220 |
taos> select round(truncate(voltage, 1), 2) from ts_4893.meters limit 1
round(truncate(voltage, 1), 2) |
=================================
221 |
taos> select truncate(abs(current), 1) from ts_4893.meters limit 1
truncate(abs(current), 1) |
============================
1.0600000e+01 |
taos> select truncate(exp(phase), 2) from ts_4893.meters limit 1
truncate(exp(phase), 2) |
============================
1.660000000000000 |
taos> select truncate(log(current), 1) from ts_4893.meters limit 1
truncate(log(current), 1) |
============================
2.300000000000000 |

1 10.550000000000001 taos> select TRUNCATE(10.55, 3)
2 10.550000000000001 truncate(10.55, 3) |
3 10.500000000000000 ============================
4 10.000000000000000 10.550000000000001 |
5 10.000000000000000 taos> select TRUNCATE(10.55, 2)
6 0.000000000000000 truncate(10.55, 2) |
7 -10.500000000000000 ============================
8 99 10.550000000000001 |
9 11.500000000000000 taos> select TRUNCATE(10.55, 1)
10 1.231230000000000e+02 truncate(10.55, 1) |
11 1.200000000000000e+08 ============================
12 8.765432100000000e+07 10.500000000000000 |
13 8.765432109999999e+07 taos> select TRUNCATE(10.55, 0)
14 8.765432112000000e+07 truncate(10.55, 0) |
15 8.765432112300000e+07 ============================
16 8.765432112340000e+07 10.000000000000000 |
17 8.765432112345000e+07 taos> select TRUNCATE(10.55, -1)
18 8.765432112345600e+07 truncate(10.55, -1) |
19 8.765432112345670e+07 ============================
20 8.765432112345679e+07 10.000000000000000 |
21 8.765432112345679e+07 taos> select TRUNCATE(10.55, -10)
22 10.0000000 truncate(10.55, -10) |
23 8.5000000 ============================
24 9.7900000 0.000000000000000 |
25 11.2329998 taos> select TRUNCATE(-10.55, 1)
26 10.7060003 truncate(-10.55, 1) |
27 8.5080004 ============================
28 9.5959997 -10.500000000000000 |
29 10.9619999 taos> select TRUNCATE(99, 1)
30 11.2259998 truncate(99, 1) |
31 10.3369999 ========================
32 10.6000004 99 |
33 8.5000000 taos> select TRUNCATE(10.55, 1) + 1
34 9.6999998 truncate(10.55, 1) + 1 |
35 11.1999998 ============================
36 10.6999998 11.500000000000000 |
37 8.5000000 taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123.123456789, 9), 8), 7), 6), 5), 4), 3)
38 9.5000000 truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
39 10.8999996 ===================================================================
40 11.1999998 1.231230000000000e+02 |
41 10.3000002 taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
42 10.550000000000001 truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
43 10.550000000000001 ===================================================================
44 10.500000000000000 1.200000000000000e+08 |
45 10.000000000000000 taos> select TRUNCATE(87654321.123456789, id) from ts_4893.meters order by ts limit 10
46 10.000000000000000 truncate(87654321.123456789, id) |
47 0.000000000000000 ===================================
48 -10.500000000000000 8.765432100000000e+07 |
49 99 8.765432109999999e+07 |
50 11.500000000000000 8.765432112000000e+07 |
51 1.231230000000000e+02 8.765432112300000e+07 |
52 1.200000000000000e+08 8.765432112340000e+07 |
53 8.765432100000000e+07 8.765432112345000e+07 |
54 8.765432109999999e+07 8.765432112345600e+07 |
55 8.765432112000000e+07 8.765432112345670e+07 |
56 8.765432112300000e+07 8.765432112345679e+07 |
57 8.765432112340000e+07 8.765432112345679e+07 |
58 8.765432112345000e+07 taos> select TRUNCATE(current, id) from ts_4893.meters order by ts limit 10
59 8.765432112345600e+07 truncate(current, id) |
60 8.765432112345670e+07 ========================
61 8.765432112345679e+07 1.0000000e+01 |
62 8.765432112345679e+07 8.5000000e+00 |
63 10.0000000 9.7900000e+00 |
64 8.5000000 1.1233000e+01 |
65 9.7900000 1.0706000e+01 |
66 11.2329998 8.5080004e+00 |
67 10.7060003 9.5959997e+00 |
68 8.5080004 1.0962000e+01 |
69 9.5959997 1.1226000e+01 |
70 10.9619999 1.0337000e+01 |
71 11.2259998 taos> select TRUNCATE(current, 1) from ts_4893.meters order by ts limit 10
72 10.3369999 truncate(current, 1) |
73 10.6000004 =======================
74 8.5000000 10.6000004 |
75 9.6999998 8.5000000 |
76 11.1999998 9.6999998 |
77 10.6999998 11.1999998 |
78 8.5000000 10.6999998 |
79 9.5000000 8.5000000 |
80 10.8999996 9.5000000 |
81 11.1999998 10.8999996 |
82 10.3000002 11.1999998 |
83 99.99 10.3000002 |
84 99.99 taos> select TRUNC(10.55, 3)
85 99.9 trunc(10.55, 3) |
86 99 ============================
87 90 10.550000000000001 |
88 0 taos> select TRUNC(10.55, 2)
89 99 trunc(10.55, 2) |
90 10.6 ============================
91 8.5 10.550000000000001 |
92 9.7 taos> select TRUNC(10.55, 1)
93 11.2 trunc(10.55, 1) |
94 10.7 ============================
95 8.5 10.500000000000000 |
96 9.5 taos> select TRUNC(10.55, 0)
97 10.9 trunc(10.55, 0) |
98 11.2 ============================
99 10.3 10.000000000000000 |
100 10.6 taos> select TRUNC(10.55, -1)
101 8.5 trunc(10.55, -1) |
102 9.7 ============================
103 11.2 10.000000000000000 |
104 10.7 taos> select TRUNC(10.55, -10)
105 8.5 trunc(10.55, -10) |
106 9.5 ============================
107 10.9 0.000000000000000 |
108 11.2 taos> select TRUNC(-10.55, 1)
109 10.3 trunc(-10.55, 1) |
110 10.6 ============================
111 8.5 -10.500000000000000 |
112 9.7 taos> select TRUNC(99, 1)
113 11.2 trunc(99, 1) |
114 10.7 ========================
115 8.5 99 |
116 9.5 taos> select TRUNC(10.55, 1) + 1
117 10.9 trunc(10.55, 1) + 1 |
118 11.2 ============================
119 10.3 11.500000000000000 |
120 10.6 taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123.123456789, 9), 8), 7), 6), 5), 4), 3)
121 8.5 trunc(trunc(trunc(trunc(trunc(trunc(trunc(123.123456789, 9), 8), |
122 9.7 ===================================================================
123 11.2 1.231230000000000e+02 |
124 10.7 taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
125 8.5 trunc(trunc(trunc(trunc(trunc(trunc(trunc(123456789.123456789, - |
126 9.5 ===================================================================
127 10.9 1.200000000000000e+08 |
128 11.2 taos> select TRUNC(87654321.123456789, id) from ts_4893.meters order by ts limit 10
129 10.3 trunc(87654321.123456789, id) |
130 ================================
131 8.765432100000000e+07 |
132 8.765432109999999e+07 |
133 8.765432112000000e+07 |
134 8.765432112300000e+07 |
135 8.765432112340000e+07 |
136 8.765432112345000e+07 |
137 8.765432112345600e+07 |
138 8.765432112345670e+07 |
139 8.765432112345679e+07 |
140 8.765432112345679e+07 |
141 taos> select TRUNC(current, id) from ts_4893.meters order by ts limit 10
142 trunc(current, id) |
143 =======================
144 10.0000000 |
145 8.5000000 |
146 9.7900000 |
147 11.2329998 |
148 10.7060003 |
149 8.5080004 |
150 9.5959997 |
151 10.9619999 |
152 11.2259998 |
153 10.3369999 |
154 taos> select TRUNC(current, 1) from ts_4893.meters order by ts limit 10
155 trunc(current, 1) |
156 =======================
157 10.6000004 |
158 8.5000000 |
159 9.6999998 |
160 11.1999998 |
161 10.6999998 |
162 8.5000000 |
163 9.5000000 |
164 10.8999996 |
165 11.1999998 |
166 10.3000002 |
167 taos> select truncate(99.99, 3)
168 truncate(99.99, 3) |
169 ============================
170 99.989999999999995 |
171 taos> select truncate(99.99, 2)
172 truncate(99.99, 2) |
173 ============================
174 99.989999999999995 |
175 taos> select truncate(99.99, 1)
176 truncate(99.99, 1) |
177 ============================
178 99.900000000000006 |
179 taos> select truncate(99.99, 0)
180 truncate(99.99, 0) |
181 ============================
182 99.000000000000000 |
183 taos> select truncate(99.99, -1)
184 truncate(99.99, -1) |
185 ============================
186 90.000000000000000 |
187 taos> select truncate(99.99, -10)
188 truncate(99.99, -10) |
189 ============================
190 0.000000000000000 |
191 taos> select truncate(99, 1)
192 truncate(99, 1) |
193 ========================
194 99 |
195 taos> select truncate(current, 1) from ts_4893.d0 order by ts limit 10
196 truncate(current, 1) |
197 =======================
198 10.6000004 |
199 8.5000000 |
200 9.6999998 |
201 11.1999998 |
202 10.6999998 |
203 8.5000000 |
204 9.5000000 |
205 10.8999996 |
206 11.1999998 |
207 10.3000002 |
208 taos> select truncate(current, 1) from ts_4893.meters order by ts limit 10
209 truncate(current, 1) |
210 =======================
211 10.6000004 |
212 8.5000000 |
213 9.6999998 |
214 11.1999998 |
215 10.6999998 |
216 8.5000000 |
217 9.5000000 |
218 10.8999996 |
219 11.1999998 |
220 10.3000002 |
221 taos> select truncate(99.99, null)
222 truncate(99.99, null) |
223 ============================
224 NULL |
225 taos> select truncate(null, 3)
226 truncate(null, 3) |
227 ====================
228 NULL |
229 taos> select truncate(1.0001, 3)
230 truncate(1.0001, 3) |
231 ============================
232 1.000000000000000 |
233 taos> select truncate(2.71828, 4)
234 truncate(2.71828, 4) |
235 ============================
236 2.718200000000000 |
237 taos> select truncate(3.14159, 2)
238 truncate(3.14159, 2) |
239 ============================
240 3.140000000000000 |
241 taos> select truncate(100.9876, 2)
242 truncate(100.9876, 2) |
243 ============================
244 100.980000000000004 |
245 taos> select truncate(99999999999999.9999, 2)
246 truncate(99999999999999.9999, 2) |
247 ===================================
248 1.000000000000000e+14 |
249 taos> select truncate(-5.678, 2)
250 truncate(-5.678, 2) |
251 ============================
252 -5.670000000000000 |
253 taos> select truncate(voltage, 2) from ts_4893.meters limit 1
254 truncate(voltage, 2) |
255 =======================
256 221 |
257 taos> select truncate(current, 1) from ts_4893.meters limit 1
258 truncate(current, 1) |
259 =======================
260 10.6000004 |
261 taos> select truncate(phase, 3) from ts_4893.meters limit 1
262 truncate(phase, 3) |
263 =======================
264 0.5080000 |
265 taos> select truncate(voltage + current, 2) from ts_4893.meters limit 1
266 truncate(voltage + current, 2) |
267 =================================
268 2.316400000000000e+02 |
269 taos> select truncate(voltage, -1) from ts_4893.meters limit 1
270 truncate(voltage, -1) |
271 ========================
272 220 |
273 taos> select round(truncate(voltage, 1), 2) from ts_4893.meters limit 1
274 round(truncate(voltage, 1), 2) |
275 =================================
276 221 |
277 taos> select truncate(abs(current), 1) from ts_4893.meters limit 1
278 truncate(abs(current), 1) |
279 ============================
280 1.0600000e+01 |
281 taos> select truncate(exp(phase), 2) from ts_4893.meters limit 1
282 truncate(exp(phase), 2) |
283 ============================
284 1.660000000000000 |
285 taos> select truncate(log(current), 1) from ts_4893.meters limit 1
286 truncate(log(current), 1) |
287 ============================
288 2.300000000000000 |
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343

View File

@ -1,343 +0,0 @@
taos> select TRUNCATE(10.55, 3)
truncate(10.55, 3) |
============================
10.550000000000001 |
taos> select TRUNCATE(10.55, 2)
truncate(10.55, 2) |
============================
10.550000000000001 |
taos> select TRUNCATE(10.55, 1)
truncate(10.55, 1) |
============================
10.500000000000000 |
taos> select TRUNCATE(10.55, 0)
truncate(10.55, 0) |
============================
10.000000000000000 |
taos> select TRUNCATE(10.55, -1)
truncate(10.55, -1) |
============================
10.000000000000000 |
taos> select TRUNCATE(10.55, -10)
truncate(10.55, -10) |
============================
0.000000000000000 |
taos> select TRUNCATE(-10.55, 1)
truncate(-10.55, 1) |
============================
-10.500000000000000 |
taos> select TRUNCATE(99, 1)
truncate(99, 1) |
========================
99 |
taos> select TRUNCATE(10.55, 1) + 1
truncate(10.55, 1) + 1 |
============================
11.500000000000000 |
taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123.123456789, 9), 8), 7), 6), 5), 4), 3)
truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
===================================================================
1.231230000000000e+02 |
taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
===================================================================
1.200000000000000e+08 |
taos> select TRUNCATE(87654321.123456789, id) from ts_4893.meters order by ts limit 10
truncate(87654321.123456789, id) |
===================================
8.765432100000000e+07 |
8.765432109999999e+07 |
8.765432112000000e+07 |
8.765432112300000e+07 |
8.765432112340000e+07 |
8.765432112345000e+07 |
8.765432112345600e+07 |
8.765432112345670e+07 |
8.765432112345679e+07 |
8.765432112345679e+07 |
taos> select TRUNCATE(current, id) from ts_4893.meters order by ts limit 10
truncate(current, id) |
========================
1.0000000e+01 |
8.5000000e+00 |
9.7900000e+00 |
1.1233000e+01 |
1.0706000e+01 |
8.5080004e+00 |
9.5959997e+00 |
1.0962000e+01 |
1.1226000e+01 |
1.0337000e+01 |
taos> select TRUNCATE(current, 1) from ts_4893.meters order by ts limit 10
truncate(current, 1) |
=======================
10.6000004 |
8.5000000 |
9.6999998 |
11.1999998 |
10.6999998 |
8.5000000 |
9.5000000 |
10.8999996 |
11.1999998 |
10.3000002 |
taos> select TRUNC(10.55, 3)
trunc(10.55, 3) |
============================
10.550000000000001 |
taos> select TRUNC(10.55, 2)
trunc(10.55, 2) |
============================
10.550000000000001 |
taos> select TRUNC(10.55, 1)
trunc(10.55, 1) |
============================
10.500000000000000 |
taos> select TRUNC(10.55, 0)
trunc(10.55, 0) |
============================
10.000000000000000 |
taos> select TRUNC(10.55, -1)
trunc(10.55, -1) |
============================
10.000000000000000 |
taos> select TRUNC(10.55, -10)
trunc(10.55, -10) |
============================
0.000000000000000 |
taos> select TRUNC(-10.55, 1)
trunc(-10.55, 1) |
============================
-10.500000000000000 |
taos> select TRUNC(99, 1)
trunc(99, 1) |
========================
99 |
taos> select TRUNC(10.55, 1) + 1
trunc(10.55, 1) + 1 |
============================
11.500000000000000 |
taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123.123456789, 9), 8), 7), 6), 5), 4), 3)
trunc(trunc(trunc(trunc(trunc(trunc(trunc(123.123456789, 9), 8), |
===================================================================
1.231230000000000e+02 |
taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
trunc(trunc(trunc(trunc(trunc(trunc(trunc(123456789.123456789, - |
===================================================================
1.200000000000000e+08 |
taos> select TRUNC(87654321.123456789, id) from ts_4893.meters order by ts limit 10
trunc(87654321.123456789, id) |
================================
8.765432100000000e+07 |
8.765432109999999e+07 |
8.765432112000000e+07 |
8.765432112300000e+07 |
8.765432112340000e+07 |
8.765432112345000e+07 |
8.765432112345600e+07 |
8.765432112345670e+07 |
8.765432112345679e+07 |
8.765432112345679e+07 |
taos> select TRUNC(current, id) from ts_4893.meters order by ts limit 10
trunc(current, id) |
=======================
10.0000000 |
8.5000000 |
9.7900000 |
11.2329998 |
10.7060003 |
8.5080004 |
9.5959997 |
10.9619999 |
11.2259998 |
10.3369999 |
taos> select TRUNC(current, 1) from ts_4893.meters order by ts limit 10
trunc(current, 1) |
=======================
10.6000004 |
8.5000000 |
9.6999998 |
11.1999998 |
10.6999998 |
8.5000000 |
9.5000000 |
10.8999996 |
11.1999998 |
10.3000002 |
taos> select truncate(99.99, 3)
truncate(99.99, 3) |
============================
99.989999999999995 |
taos> select truncate(99.99, 2)
truncate(99.99, 2) |
============================
99.989999999999995 |
taos> select truncate(99.99, 1)
truncate(99.99, 1) |
============================
99.900000000000006 |
taos> select truncate(99.99, 0)
truncate(99.99, 0) |
============================
99.000000000000000 |
taos> select truncate(99.99, -1)
truncate(99.99, -1) |
============================
90.000000000000000 |
taos> select truncate(99.99, -10)
truncate(99.99, -10) |
============================
0.000000000000000 |
taos> select truncate(99, 1)
truncate(99, 1) |
========================
99 |
taos> select truncate(current, 1) from ts_4893.d0 order by ts limit 10
truncate(current, 1) |
=======================
10.6000004 |
8.5000000 |
9.6999998 |
11.1999998 |
10.6999998 |
8.5000000 |
9.5000000 |
10.8999996 |
11.1999998 |
10.3000002 |
taos> select truncate(current, 1) from ts_4893.meters order by ts limit 10
truncate(current, 1) |
=======================
10.6000004 |
8.5000000 |
9.6999998 |
11.1999998 |
10.6999998 |
8.5000000 |
9.5000000 |
10.8999996 |
11.1999998 |
10.3000002 |
taos> select truncate(99.99, null)
truncate(99.99, null) |
============================
NULL |
taos> select truncate(null, 3)
truncate(null, 3) |
====================
NULL |
taos> select truncate(1.0001, 3)
truncate(1.0001, 3) |
============================
1.000000000000000 |
taos> select truncate(2.71828, 4)
truncate(2.71828, 4) |
============================
2.718200000000000 |
taos> select truncate(3.14159, 2)
truncate(3.14159, 2) |
============================
3.140000000000000 |
taos> select truncate(100.9876, 2)
truncate(100.9876, 2) |
============================
100.980000000000004 |
taos> select truncate(99999999999999.9999, 2)
truncate(99999999999999.9999, 2) |
===================================
1.000000000000000e+14 |
taos> select truncate(-5.678, 2)
truncate(-5.678, 2) |
============================
-5.670000000000000 |
taos> select truncate(voltage, 2) from ts_4893.meters limit 1
truncate(voltage, 2) |
=======================
221 |
taos> select truncate(current, 1) from ts_4893.meters limit 1
truncate(current, 1) |
=======================
10.6000004 |
taos> select truncate(phase, 3) from ts_4893.meters limit 1
truncate(phase, 3) |
=======================
0.5080000 |
taos> select truncate(voltage + current, 2) from ts_4893.meters limit 1
truncate(voltage + current, 2) |
=================================
2.316400000000000e+02 |
taos> select truncate(voltage, -1) from ts_4893.meters limit 1
truncate(voltage, -1) |
========================
220 |
taos> select round(truncate(voltage, 1), 2) from ts_4893.meters limit 1
round(truncate(voltage, 1), 2) |
=================================
221 |
taos> select truncate(abs(current), 1) from ts_4893.meters limit 1
truncate(abs(current), 1) |
============================
1.0600000e+01 |
taos> select truncate(exp(phase), 2) from ts_4893.meters limit 1
truncate(exp(phase), 2) |
============================
1.660000000000000 |
taos> select truncate(log(current), 1) from ts_4893.meters limit 1
truncate(log(current), 1) |
============================
2.300000000000000 |
1 taos> select TRUNCATE(10.55, 3)
2 truncate(10.55, 3) |
3 ============================
4 10.550000000000001 |
5 taos> select TRUNCATE(10.55, 2)
6 truncate(10.55, 2) |
7 ============================
8 10.550000000000001 |
9 taos> select TRUNCATE(10.55, 1)
10 truncate(10.55, 1) |
11 ============================
12 10.500000000000000 |
13 taos> select TRUNCATE(10.55, 0)
14 truncate(10.55, 0) |
15 ============================
16 10.000000000000000 |
17 taos> select TRUNCATE(10.55, -1)
18 truncate(10.55, -1) |
19 ============================
20 10.000000000000000 |
21 taos> select TRUNCATE(10.55, -10)
22 truncate(10.55, -10) |
23 ============================
24 0.000000000000000 |
25 taos> select TRUNCATE(-10.55, 1)
26 truncate(-10.55, 1) |
27 ============================
28 -10.500000000000000 |
29 taos> select TRUNCATE(99, 1)
30 truncate(99, 1) |
31 ========================
32 99 |
33 taos> select TRUNCATE(10.55, 1) + 1
34 truncate(10.55, 1) + 1 |
35 ============================
36 11.500000000000000 |
37 taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123.123456789, 9), 8), 7), 6), 5), 4), 3)
38 truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
39 ===================================================================
40 1.231230000000000e+02 |
41 taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
42 truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 |
43 ===================================================================
44 1.200000000000000e+08 |
45 taos> select TRUNCATE(87654321.123456789, id) from ts_4893.meters order by ts limit 10
46 truncate(87654321.123456789, id) |
47 ===================================
48 8.765432100000000e+07 |
49 8.765432109999999e+07 |
50 8.765432112000000e+07 |
51 8.765432112300000e+07 |
52 8.765432112340000e+07 |
53 8.765432112345000e+07 |
54 8.765432112345600e+07 |
55 8.765432112345670e+07 |
56 8.765432112345679e+07 |
57 8.765432112345679e+07 |
58 taos> select TRUNCATE(current, id) from ts_4893.meters order by ts limit 10
59 truncate(current, id) |
60 ========================
61 1.0000000e+01 |
62 8.5000000e+00 |
63 9.7900000e+00 |
64 1.1233000e+01 |
65 1.0706000e+01 |
66 8.5080004e+00 |
67 9.5959997e+00 |
68 1.0962000e+01 |
69 1.1226000e+01 |
70 1.0337000e+01 |
71 taos> select TRUNCATE(current, 1) from ts_4893.meters order by ts limit 10
72 truncate(current, 1) |
73 =======================
74 10.6000004 |
75 8.5000000 |
76 9.6999998 |
77 11.1999998 |
78 10.6999998 |
79 8.5000000 |
80 9.5000000 |
81 10.8999996 |
82 11.1999998 |
83 10.3000002 |
84 taos> select TRUNC(10.55, 3)
85 trunc(10.55, 3) |
86 ============================
87 10.550000000000001 |
88 taos> select TRUNC(10.55, 2)
89 trunc(10.55, 2) |
90 ============================
91 10.550000000000001 |
92 taos> select TRUNC(10.55, 1)
93 trunc(10.55, 1) |
94 ============================
95 10.500000000000000 |
96 taos> select TRUNC(10.55, 0)
97 trunc(10.55, 0) |
98 ============================
99 10.000000000000000 |
100 taos> select TRUNC(10.55, -1)
101 trunc(10.55, -1) |
102 ============================
103 10.000000000000000 |
104 taos> select TRUNC(10.55, -10)
105 trunc(10.55, -10) |
106 ============================
107 0.000000000000000 |
108 taos> select TRUNC(-10.55, 1)
109 trunc(-10.55, 1) |
110 ============================
111 -10.500000000000000 |
112 taos> select TRUNC(99, 1)
113 trunc(99, 1) |
114 ========================
115 99 |
116 taos> select TRUNC(10.55, 1) + 1
117 trunc(10.55, 1) + 1 |
118 ============================
119 11.500000000000000 |
120 taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123.123456789, 9), 8), 7), 6), 5), 4), 3)
121 trunc(trunc(trunc(trunc(trunc(trunc(trunc(123.123456789, 9), 8), |
122 ===================================================================
123 1.231230000000000e+02 |
124 taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
125 trunc(trunc(trunc(trunc(trunc(trunc(trunc(123456789.123456789, - |
126 ===================================================================
127 1.200000000000000e+08 |
128 taos> select TRUNC(87654321.123456789, id) from ts_4893.meters order by ts limit 10
129 trunc(87654321.123456789, id) |
130 ================================
131 8.765432100000000e+07 |
132 8.765432109999999e+07 |
133 8.765432112000000e+07 |
134 8.765432112300000e+07 |
135 8.765432112340000e+07 |
136 8.765432112345000e+07 |
137 8.765432112345600e+07 |
138 8.765432112345670e+07 |
139 8.765432112345679e+07 |
140 8.765432112345679e+07 |
141 taos> select TRUNC(current, id) from ts_4893.meters order by ts limit 10
142 trunc(current, id) |
143 =======================
144 10.0000000 |
145 8.5000000 |
146 9.7900000 |
147 11.2329998 |
148 10.7060003 |
149 8.5080004 |
150 9.5959997 |
151 10.9619999 |
152 11.2259998 |
153 10.3369999 |
154 taos> select TRUNC(current, 1) from ts_4893.meters order by ts limit 10
155 trunc(current, 1) |
156 =======================
157 10.6000004 |
158 8.5000000 |
159 9.6999998 |
160 11.1999998 |
161 10.6999998 |
162 8.5000000 |
163 9.5000000 |
164 10.8999996 |
165 11.1999998 |
166 10.3000002 |
167 taos> select truncate(99.99, 3)
168 truncate(99.99, 3) |
169 ============================
170 99.989999999999995 |
171 taos> select truncate(99.99, 2)
172 truncate(99.99, 2) |
173 ============================
174 99.989999999999995 |
175 taos> select truncate(99.99, 1)
176 truncate(99.99, 1) |
177 ============================
178 99.900000000000006 |
179 taos> select truncate(99.99, 0)
180 truncate(99.99, 0) |
181 ============================
182 99.000000000000000 |
183 taos> select truncate(99.99, -1)
184 truncate(99.99, -1) |
185 ============================
186 90.000000000000000 |
187 taos> select truncate(99.99, -10)
188 truncate(99.99, -10) |
189 ============================
190 0.000000000000000 |
191 taos> select truncate(99, 1)
192 truncate(99, 1) |
193 ========================
194 99 |
195 taos> select truncate(current, 1) from ts_4893.d0 order by ts limit 10
196 truncate(current, 1) |
197 =======================
198 10.6000004 |
199 8.5000000 |
200 9.6999998 |
201 11.1999998 |
202 10.6999998 |
203 8.5000000 |
204 9.5000000 |
205 10.8999996 |
206 11.1999998 |
207 10.3000002 |
208 taos> select truncate(current, 1) from ts_4893.meters order by ts limit 10
209 truncate(current, 1) |
210 =======================
211 10.6000004 |
212 8.5000000 |
213 9.6999998 |
214 11.1999998 |
215 10.6999998 |
216 8.5000000 |
217 9.5000000 |
218 10.8999996 |
219 11.1999998 |
220 10.3000002 |
221 taos> select truncate(99.99, null)
222 truncate(99.99, null) |
223 ============================
224 NULL |
225 taos> select truncate(null, 3)
226 truncate(null, 3) |
227 ====================
228 NULL |
229 taos> select truncate(1.0001, 3)
230 truncate(1.0001, 3) |
231 ============================
232 1.000000000000000 |
233 taos> select truncate(2.71828, 4)
234 truncate(2.71828, 4) |
235 ============================
236 2.718200000000000 |
237 taos> select truncate(3.14159, 2)
238 truncate(3.14159, 2) |
239 ============================
240 3.140000000000000 |
241 taos> select truncate(100.9876, 2)
242 truncate(100.9876, 2) |
243 ============================
244 100.980000000000004 |
245 taos> select truncate(99999999999999.9999, 2)
246 truncate(99999999999999.9999, 2) |
247 ===================================
248 1.000000000000000e+14 |
249 taos> select truncate(-5.678, 2)
250 truncate(-5.678, 2) |
251 ============================
252 -5.670000000000000 |
253 taos> select truncate(voltage, 2) from ts_4893.meters limit 1
254 truncate(voltage, 2) |
255 =======================
256 221 |
257 taos> select truncate(current, 1) from ts_4893.meters limit 1
258 truncate(current, 1) |
259 =======================
260 10.6000004 |
261 taos> select truncate(phase, 3) from ts_4893.meters limit 1
262 truncate(phase, 3) |
263 =======================
264 0.5080000 |
265 taos> select truncate(voltage + current, 2) from ts_4893.meters limit 1
266 truncate(voltage + current, 2) |
267 =================================
268 2.316400000000000e+02 |
269 taos> select truncate(voltage, -1) from ts_4893.meters limit 1
270 truncate(voltage, -1) |
271 ========================
272 220 |
273 taos> select round(truncate(voltage, 1), 2) from ts_4893.meters limit 1
274 round(truncate(voltage, 1), 2) |
275 =================================
276 221 |
277 taos> select truncate(abs(current), 1) from ts_4893.meters limit 1
278 truncate(abs(current), 1) |
279 ============================
280 1.0600000e+01 |
281 taos> select truncate(exp(phase), 2) from ts_4893.meters limit 1
282 truncate(exp(phase), 2) |
283 ============================
284 1.660000000000000 |
285 taos> select truncate(log(current), 1) from ts_4893.meters limit 1
286 truncate(log(current), 1) |
287 ============================
288 2.300000000000000 |

View File

@ -1,37 +1,128 @@
1.332500071133753
0.702702307045610 taos> select VAR_POP(current) from ts_4893.meters
0.703315838252072 var_pop(current) |
0.705108647169672 ============================
0.705108647169672 1.332500071133751 |
0.706550935286583
0.713306900568867 taos> select VAR_POP(current) from ts_4893.meters interval(1d) order by 1 limit 10
0.716868311383919 var_pop(current) |
0.717430738826275 ============================
0.717718552465788 0.702702307045612 |
0.719483293517451 0.703315838252067 |
8333333.250000000000000 0.705108647169666 |
21.250000000000000 0.705108647169666 |
70.000000000000000 0.706550935286586 |
70.000000000000000 0.713306900568867 |
70.000000000000000 0.716868311383919 |
70.000000000000000 0.717430738826280 |
65.250000000000000 0.717718552465783 |
70.000000000000000 0.719483293517456 |
70.000000000000000
70.000000000000000 taos> select VAR_POP(id) from ts_4893.meters
70.000000000000000 var_pop(id) |
8165850.000000000000000 ============================
21.250000000000000 8333333.250000000000000 |
30.000000000000000
65.250000000000000 taos> select VAR_POP(id) from ts_4893.meters interval(1d) limit 10
65.250000000000000 var_pop(id) |
65.250000000000000 ============================
65.250000000000000 21.250000000000000 |
65.250000000000000 70.000000000000000 |
65.250000000000000 70.000000000000000 |
65.250000000000000 70.000000000000000 |
65.250000000000000 70.000000000000000 |
8333333.250000000000000 65.250000000000000 |
8333333.250000000000000 70.000000000000000 |
1.332500071133751 70.000000000000000 |
1.332500071133751 70.000000000000000 |
70.000000000000000 |
taos> select VAR_POP(id) from ts_4893.meters where id > 100
var_pop(id) |
============================
8165850.000000000000000 |
taos> select VAR_POP(id) from ts_4893.meters interval(1d) order by 1 limit 10
var_pop(id) |
============================
21.250000000000000 |
30.000000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
taos> select var_pop(null) from ts_4893.meters
var_pop(null) |
============================
NULL |
taos> select var_pop(id) from ts_4893.d0
var_pop(id) |
============================
8333333.250000000000000 |
taos> select var_pop(current) from ts_4893.d0
var_pop(current) |
============================
1.332500071133751 |
taos> select var_pop(voltage) from ts_4893.meters
var_pop(voltage) |
============================
8.274020439996093 |
taos> select var_pop(voltage) from ts_4893.meters where voltage is not null
var_pop(voltage) |
============================
8.274020439996093 |
taos> select var_pop(phase) from ts_4893.meters
var_pop(phase) |
============================
0.083287338468169 |
taos> select var_pop(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
var_pop(phase) |
============================
0.082987411872200 |
taos> select var_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
var_pop(total_voltage) |
============================
0.000000000000000 |
taos> select round(var_pop(current), 2) from ts_4893.meters
round(var_pop(current), 2) |
=============================
1.330000000000000e+00 |
taos> select pow(var_pop(current), 2) from ts_4893.meters
pow(var_pop(current), 2) |
============================
1.775556439571451 |
taos> select log(var_pop(voltage) + 1) from ts_4893.meters
log(var_pop(voltage) + 1) |
============================
2.227216989977633 |
taos> select groupid, var_pop(voltage) from ts_4893.meters group by groupid order by groupid
groupid | var_pop(voltage) |
======================================
1 | 8.274020439996093 |
taos> select location, var_pop(current) from ts_4893.meters group by location order by location
location | var_pop(current) |
=================================================
beijing | 1.332500071133751 |
taos> select location, var_pop(voltage) from ts_4893.meters group by location order by location
location | var_pop(voltage) |
=================================================
beijing | 8.274020439996093 |

Can't render this file because it has a wrong number of fields in line 99.

View File

@ -1,128 +0,0 @@
taos> select VAR_POP(current) from ts_4893.meters
var_pop(current) |
============================
1.332500071133751 |
taos> select VAR_POP(current) from ts_4893.meters interval(1d) order by 1 limit 10
var_pop(current) |
============================
0.702702307045612 |
0.703315838252067 |
0.705108647169666 |
0.705108647169666 |
0.706550935286586 |
0.713306900568867 |
0.716868311383919 |
0.717430738826280 |
0.717718552465783 |
0.719483293517456 |
taos> select VAR_POP(id) from ts_4893.meters
var_pop(id) |
============================
8333333.250000000000000 |
taos> select VAR_POP(id) from ts_4893.meters interval(1d) limit 10
var_pop(id) |
============================
21.250000000000000 |
70.000000000000000 |
70.000000000000000 |
70.000000000000000 |
70.000000000000000 |
65.250000000000000 |
70.000000000000000 |
70.000000000000000 |
70.000000000000000 |
70.000000000000000 |
taos> select VAR_POP(id) from ts_4893.meters where id > 100
var_pop(id) |
============================
8165850.000000000000000 |
taos> select VAR_POP(id) from ts_4893.meters interval(1d) order by 1 limit 10
var_pop(id) |
============================
21.250000000000000 |
30.000000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
65.250000000000000 |
taos> select var_pop(null) from ts_4893.meters
var_pop(null) |
============================
NULL |
taos> select var_pop(id) from ts_4893.d0
var_pop(id) |
============================
8333333.250000000000000 |
taos> select var_pop(current) from ts_4893.d0
var_pop(current) |
============================
1.332500071133751 |
taos> select var_pop(voltage) from ts_4893.meters
var_pop(voltage) |
============================
8.274020439996093 |
taos> select var_pop(voltage) from ts_4893.meters where voltage is not null
var_pop(voltage) |
============================
8.274020439996093 |
taos> select var_pop(phase) from ts_4893.meters
var_pop(phase) |
============================
0.083287338468169 |
taos> select var_pop(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
var_pop(phase) |
============================
0.082987411872200 |
taos> select var_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
var_pop(total_voltage) |
============================
0.000000000000000 |
taos> select round(var_pop(current), 2) from ts_4893.meters
round(var_pop(current), 2) |
=============================
1.330000000000000e+00 |
taos> select pow(var_pop(current), 2) from ts_4893.meters
pow(var_pop(current), 2) |
============================
1.775556439571451 |
taos> select log(var_pop(voltage) + 1) from ts_4893.meters
log(var_pop(voltage) + 1) |
============================
2.227216989977633 |
taos> select groupid, var_pop(voltage) from ts_4893.meters group by groupid order by groupid
groupid | var_pop(voltage) |
======================================
1 | 8.274020439996093 |
taos> select location, var_pop(current) from ts_4893.meters group by location order by location
location | var_pop(current) |
=================================================
beijing | 1.332500071133751 |
taos> select location, var_pop(voltage) from ts_4893.meters group by location order by location
location | var_pop(voltage) |
=================================================
beijing | 8.274020439996093 |
Can't render this file because it has a wrong number of fields in line 99.

View File

@ -1,174 +1,565 @@
0
0 taos> select WEEK('2020-01-01 00:00:00')
1 week('2020-01-01 00:00:00') |
52 ==============================
1 0 |
1
0 taos> select WEEK('2020-01-01 00:00:00', 0)
1 week('2020-01-01 00:00:00', 0) |
52 =================================
0 0 |
0
0 taos> select WEEK('2020-01-01 00:00:00', 1)
52 week('2020-01-01 00:00:00', 1) |
53 =================================
0 1 |
0
53 taos> select WEEK('2020-01-01 00:00:00', 2)
52 week('2020-01-01 00:00:00', 2) |
0 =================================
0 52 |
1
52 taos> select WEEK('2020-01-01 00:00:00', 3)
1 week('2020-01-01 00:00:00', 3) |
0 =================================
0 1 |
53
52 taos> select WEEK('2020-01-01 00:00:00', 4)
52 week('2020-01-01 00:00:00', 4) |
52 =================================
53 1 |
52
53 taos> select WEEK('2020-01-01 00:00:00', 5)
52 week('2020-01-01 00:00:00', 5) |
52 =================================
52 0 |
52
1 taos> select WEEK('2020-01-01 00:00:00', 6)
1 week('2020-01-01 00:00:00', 6) |
1 =================================
1 1 |
1
1 taos> select WEEK('2020-01-01 00:00:00', 7)
1 week('2020-01-01 00:00:00', 7) |
1 =================================
1 52 |
3
3 taos> select WEEK('2021-01-01 00:00:00')
4 week('2021-01-01 00:00:00') |
3 ==============================
4 0 |
3
3 taos> select WEEK('2021-01-01 00:00:00', 0)
3 week('2021-01-01 00:00:00', 0) |
28 =================================
28 0 |
28
28 taos> select WEEK('2021-01-01 00:00:00', 1)
28 week('2021-01-01 00:00:00', 1) |
28 =================================
28 0 |
28
28 taos> select WEEK('2021-01-01 00:00:00', 2)
28 week('2021-01-01 00:00:00', 2) |
28 =================================
28 52 |
28
28 taos> select WEEK('2021-01-01 00:00:00', 3)
28 week('2021-01-01 00:00:00', 3) |
28 =================================
28 53 |
28
28 taos> select WEEK('2021-01-01 00:00:00', 4)
28 week('2021-01-01 00:00:00', 4) |
28 =================================
28 0 |
28
28 taos> select WEEK('2021-01-01 00:00:00', 5)
28 week('2021-01-01 00:00:00', 5) |
28 =================================
28 0 |
28
28 taos> select WEEK('2021-01-01 00:00:00', 6)
28 week('2021-01-01 00:00:00', 6) |
28 =================================
28 53 |
28
28 taos> select WEEK('2021-01-01 00:00:00', 7)
28 week('2021-01-01 00:00:00', 7) |
28 =================================
28 52 |
28
28 taos> select WEEK('1998-01-01 00:00:00')
28 week('1998-01-01 00:00:00') |
28 ==============================
28 0 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 0)
28 week('1998-01-01 00:00:00', 0) |
28 =================================
28 0 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 1)
28 week('1998-01-01 00:00:00', 1) |
28 =================================
28 1 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 2)
28 week('1998-01-01 00:00:00', 2) |
28 =================================
28 52 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 3)
28 week('1998-01-01 00:00:00', 3) |
28 =================================
28 1 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 4)
28 week('1998-01-01 00:00:00', 4) |
28 =================================
28 0 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 5)
28 week('1998-01-01 00:00:00', 5) |
28 =================================
28 0 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 6)
28 week('1998-01-01 00:00:00', 6) |
28 =================================
28 53 |
28
28 taos> select WEEK('1998-01-01 00:00:00', 7)
28 week('1998-01-01 00:00:00', 7) |
28 =================================
28 52 |
28
28 taos> select WEEK('1998-12-31 00:00:00')
28 week('1998-12-31 00:00:00') |
28 ==============================
28 52 |
28
28 taos> select WEEK('1998-12-31 00:00:00', 0)
28 week('1998-12-31 00:00:00', 0) |
0 =================================
0 52 |
0
52 taos> select WEEK('1998-12-31 00:00:00', 1)
52 week('1998-12-31 00:00:00', 1) |
0 =================================
0 53 |
52
52 taos> select WEEK('1998-12-31 00:00:00', 2)
3 week('1998-12-31 00:00:00', 2) |
52 =================================
28 52 |
28
28 taos> select WEEK('1998-12-31 00:00:00', 3)
28 week('1998-12-31 00:00:00', 3) |
28 =================================
28 53 |
28
28 taos> select WEEK('1998-12-31 00:00:00', 4)
28 week('1998-12-31 00:00:00', 4) |
28 =================================
28 52 |
28
28 taos> select WEEK('1998-12-31 00:00:00', 5)
28 week('1998-12-31 00:00:00', 5) |
28 =================================
28 52 |
28
28 taos> select WEEK('1998-12-31 00:00:00', 6)
28 week('1998-12-31 00:00:00', 6) |
28 =================================
52 |
taos> select WEEK('1998-12-31 00:00:00', 7)
week('1998-12-31 00:00:00', 7) |
=================================
52 |
taos> select WEEK('2000-01-06 00:00:00')
week('2000-01-06 00:00:00') |
==============================
1 |
taos> select WEEK('2000-01-06 00:00:00', 0)
week('2000-01-06 00:00:00', 0) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 1)
week('2000-01-06 00:00:00', 1) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 2)
week('2000-01-06 00:00:00', 2) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 3)
week('2000-01-06 00:00:00', 3) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 4)
week('2000-01-06 00:00:00', 4) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 5)
week('2000-01-06 00:00:00', 5) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 6)
week('2000-01-06 00:00:00', 6) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 7)
week('2000-01-06 00:00:00', 7) |
=================================
1 |
taos> select WEEK(1725095657)
week(1725095657) |
========================
3 |
taos> select WEEK(1725095657, 0)
week(1725095657, 0) |
========================
3 |
taos> select WEEK(1725095657, 1)
week(1725095657, 1) |
========================
4 |
taos> select WEEK(1725095657, 2)
week(1725095657, 2) |
========================
3 |
taos> select WEEK(1725095657, 3)
week(1725095657, 3) |
========================
4 |
taos> select WEEK(1725095657, 4)
week(1725095657, 4) |
========================
3 |
taos> select WEEK(1725095657, 5)
week(1725095657, 5) |
========================
3 |
taos> select WEEK(1725095657, 6)
week(1725095657, 6) |
========================
3 |
taos> select WEEK(ts) from ts_4893.meters order by ts limit 10
week(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 0) from ts_4893.meters order by ts limit 10
week(ts, 0) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 1) from ts_4893.meters order by ts limit 10
week(ts, 1) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 2) from ts_4893.meters order by ts limit 10
week(ts, 2) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 3) from ts_4893.meters order by ts limit 10
week(ts, 3) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 4) from ts_4893.meters order by ts limit 10
week(ts, 4) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 5) from ts_4893.meters order by ts limit 10
week(ts, 5) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 6) from ts_4893.meters order by ts limit 10
week(ts, 6) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 7) from ts_4893.meters order by ts limit 10
week(ts, 7) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select week(123)
week(123) |
========================
0 |
taos> select week('2000-01-01',0)
week('2000-01-01',0) |
========================
0 |
taos> select week('2000-01-01',1)
week('2000-01-01',1) |
========================
0 |
taos> select week('2000-01-01',2)
week('2000-01-01',2) |
========================
52 |
taos> select week('2000-01-01',3)
week('2000-01-01',3) |
========================
52 |
taos> select week('2000-01-01',4)
week('2000-01-01',4) |
========================
0 |
taos> select week('2000-01-01',5)
week('2000-01-01',5) |
========================
0 |
taos> select week('2000-01-01',6)
week('2000-01-01',6) |
========================
52 |
taos> select week('2000-01-01',7)
week('2000-01-01',7) |
========================
52 |
taos> select week(1721020591,0)
week(1721020591,0) |
========================
3 |
taos> select week('2020-01-01 00:00:00', 2)
week('2020-01-01 00:00:00', 2) |
=================================
52 |
taos> select week(ts) from ts_4893.d0 order by ts limit 10
week(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select week(ts) from ts_4893.meters order by ts limit 10
week(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select week(null, 0)
week(null, 0) |
========================
NULL |
taos> select week('abc')
week('abc') |
========================
NULL |
taos> select week('1721020591', 0)
week('1721020591', 0) |
========================
NULL |
taos> select week('1721020666229', 0)
week('1721020666229', 0) |
===========================
NULL |
taos> select week('20200101', 2)
week('20200101', 2) |
========================
NULL |
taos> select week('11/01/31', 2)
week('11/01/31', 2) |
========================
NULL |
taos> select week('20/01/01', 2)
week('20/01/01', 2) |
========================
NULL |
taos> select week('01/01/2020', 2)
week('01/01/2020', 2) |
========================
NULL |
taos> select week('01-JAN-20', 2)
week('01-JAN-20', 2) |
========================
NULL |
taos> select week('2023-09-25')
week('2023-09-25') |
========================
39 |
taos> select week('9999-12-31')
week('9999-12-31') |
========================
52 |
taos> select week('2024-02-29 00:00:00')
week('2024-02-29 00:00:00') |
==============================
8 |
taos> select week(ts) from ts_4893.meters limit 1
week(ts) |
========================
28 |
taos> select week(name) from ts_4893.meters limit 1
week(name) |
========================
NULL |
taos> select week(ts), dayofweek(ts) from ts_4893.meters limit 1
week(ts) | dayofweek(ts) |
================================================
28 | 6 |
taos> select week(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
week(timediff(ts, '2024-10-10 09:36:50.172')) |
================================================
39 |
taos> select id, week(ts) from ts_4893.meters where id = 1 limit 1
id | week(ts) |
======================================
1 | 28 |
taos> select groupid, sum(week(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(week(ts)) |
==================================
1 | 2669490 |

1 0 taos> select WEEK('2020-01-01 00:00:00')
2 0 week('2020-01-01 00:00:00') |
3 1 ==============================
4 52 0 |
5 1 taos> select WEEK('2020-01-01 00:00:00', 0)
6 1 week('2020-01-01 00:00:00', 0) |
7 0 =================================
8 1 0 |
9 52 taos> select WEEK('2020-01-01 00:00:00', 1)
10 0 week('2020-01-01 00:00:00', 1) |
11 0 =================================
12 0 1 |
13 52 taos> select WEEK('2020-01-01 00:00:00', 2)
14 53 week('2020-01-01 00:00:00', 2) |
15 0 =================================
16 0 52 |
17 53 taos> select WEEK('2020-01-01 00:00:00', 3)
18 52 week('2020-01-01 00:00:00', 3) |
19 0 =================================
20 0 1 |
21 1 taos> select WEEK('2020-01-01 00:00:00', 4)
22 52 week('2020-01-01 00:00:00', 4) |
23 1 =================================
24 0 1 |
25 0 taos> select WEEK('2020-01-01 00:00:00', 5)
26 53 week('2020-01-01 00:00:00', 5) |
27 52 =================================
28 52 0 |
29 52 taos> select WEEK('2020-01-01 00:00:00', 6)
30 53 week('2020-01-01 00:00:00', 6) |
31 52 =================================
32 53 1 |
33 52 taos> select WEEK('2020-01-01 00:00:00', 7)
34 52 week('2020-01-01 00:00:00', 7) |
35 52 =================================
36 52 52 |
37 1 taos> select WEEK('2021-01-01 00:00:00')
38 1 week('2021-01-01 00:00:00') |
39 1 ==============================
40 1 0 |
41 1 taos> select WEEK('2021-01-01 00:00:00', 0)
42 1 week('2021-01-01 00:00:00', 0) |
43 1 =================================
44 1 0 |
45 1 taos> select WEEK('2021-01-01 00:00:00', 1)
46 3 week('2021-01-01 00:00:00', 1) |
47 3 =================================
48 4 0 |
49 3 taos> select WEEK('2021-01-01 00:00:00', 2)
50 4 week('2021-01-01 00:00:00', 2) |
51 3 =================================
52 3 52 |
53 3 taos> select WEEK('2021-01-01 00:00:00', 3)
54 28 week('2021-01-01 00:00:00', 3) |
55 28 =================================
56 28 53 |
57 28 taos> select WEEK('2021-01-01 00:00:00', 4)
58 28 week('2021-01-01 00:00:00', 4) |
59 28 =================================
60 28 0 |
61 28 taos> select WEEK('2021-01-01 00:00:00', 5)
62 28 week('2021-01-01 00:00:00', 5) |
63 28 =================================
64 28 0 |
65 28 taos> select WEEK('2021-01-01 00:00:00', 6)
66 28 week('2021-01-01 00:00:00', 6) |
67 28 =================================
68 28 53 |
69 28 taos> select WEEK('2021-01-01 00:00:00', 7)
70 28 week('2021-01-01 00:00:00', 7) |
71 28 =================================
72 28 52 |
73 28 taos> select WEEK('1998-01-01 00:00:00')
74 28 week('1998-01-01 00:00:00') |
75 28 ==============================
76 28 0 |
77 28 taos> select WEEK('1998-01-01 00:00:00', 0)
78 28 week('1998-01-01 00:00:00', 0) |
79 28 =================================
80 28 0 |
81 28 taos> select WEEK('1998-01-01 00:00:00', 1)
82 28 week('1998-01-01 00:00:00', 1) |
83 28 =================================
84 28 1 |
85 28 taos> select WEEK('1998-01-01 00:00:00', 2)
86 28 week('1998-01-01 00:00:00', 2) |
87 28 =================================
88 28 52 |
89 28 taos> select WEEK('1998-01-01 00:00:00', 3)
90 28 week('1998-01-01 00:00:00', 3) |
91 28 =================================
92 28 1 |
93 28 taos> select WEEK('1998-01-01 00:00:00', 4)
94 28 week('1998-01-01 00:00:00', 4) |
95 28 =================================
96 28 0 |
97 28 taos> select WEEK('1998-01-01 00:00:00', 5)
98 28 week('1998-01-01 00:00:00', 5) |
99 28 =================================
100 28 0 |
101 28 taos> select WEEK('1998-01-01 00:00:00', 6)
102 28 week('1998-01-01 00:00:00', 6) |
103 28 =================================
104 28 53 |
105 28 taos> select WEEK('1998-01-01 00:00:00', 7)
106 28 week('1998-01-01 00:00:00', 7) |
107 28 =================================
108 28 52 |
109 28 taos> select WEEK('1998-12-31 00:00:00')
110 28 week('1998-12-31 00:00:00') |
111 28 ==============================
112 28 52 |
113 28 taos> select WEEK('1998-12-31 00:00:00', 0)
114 28 week('1998-12-31 00:00:00', 0) |
115 28 =================================
116 28 52 |
117 28 taos> select WEEK('1998-12-31 00:00:00', 1)
118 28 week('1998-12-31 00:00:00', 1) |
119 28 =================================
120 28 53 |
121 28 taos> select WEEK('1998-12-31 00:00:00', 2)
122 28 week('1998-12-31 00:00:00', 2) |
123 28 =================================
124 28 52 |
125 28 taos> select WEEK('1998-12-31 00:00:00', 3)
126 28 week('1998-12-31 00:00:00', 3) |
127 28 =================================
128 28 53 |
129 28 taos> select WEEK('1998-12-31 00:00:00', 4)
130 28 week('1998-12-31 00:00:00', 4) |
131 28 =================================
132 28 52 |
133 28 taos> select WEEK('1998-12-31 00:00:00', 5)
134 28 week('1998-12-31 00:00:00', 5) |
135 28 =================================
136 28 52 |
137 28 taos> select WEEK('1998-12-31 00:00:00', 6)
138 28 week('1998-12-31 00:00:00', 6) |
139 28 =================================
140 28 52 |
141 28 taos> select WEEK('1998-12-31 00:00:00', 7)
142 28 week('1998-12-31 00:00:00', 7) |
143 28 =================================
144 0 52 |
145 0 taos> select WEEK('2000-01-06 00:00:00')
146 0 week('2000-01-06 00:00:00') |
147 52 ==============================
148 52 1 |
149 0 taos> select WEEK('2000-01-06 00:00:00', 0)
150 0 week('2000-01-06 00:00:00', 0) |
151 52 =================================
152 52 1 |
153 3 taos> select WEEK('2000-01-06 00:00:00', 1)
154 52 week('2000-01-06 00:00:00', 1) |
155 28 =================================
156 28 1 |
157 28 taos> select WEEK('2000-01-06 00:00:00', 2)
158 28 week('2000-01-06 00:00:00', 2) |
159 28 =================================
160 28 1 |
161 28 taos> select WEEK('2000-01-06 00:00:00', 3)
162 28 week('2000-01-06 00:00:00', 3) |
163 28 =================================
164 28 1 |
165 28 taos> select WEEK('2000-01-06 00:00:00', 4)
166 28 week('2000-01-06 00:00:00', 4) |
167 28 =================================
168 28 1 |
169 28 taos> select WEEK('2000-01-06 00:00:00', 5)
170 28 week('2000-01-06 00:00:00', 5) |
171 28 =================================
172 28 1 |
173 28 taos> select WEEK('2000-01-06 00:00:00', 6)
174 28 week('2000-01-06 00:00:00', 6) |
175 =================================
176 1 |
177 taos> select WEEK('2000-01-06 00:00:00', 7)
178 week('2000-01-06 00:00:00', 7) |
179 =================================
180 1 |
181 taos> select WEEK(1725095657)
182 week(1725095657) |
183 ========================
184 3 |
185 taos> select WEEK(1725095657, 0)
186 week(1725095657, 0) |
187 ========================
188 3 |
189 taos> select WEEK(1725095657, 1)
190 week(1725095657, 1) |
191 ========================
192 4 |
193 taos> select WEEK(1725095657, 2)
194 week(1725095657, 2) |
195 ========================
196 3 |
197 taos> select WEEK(1725095657, 3)
198 week(1725095657, 3) |
199 ========================
200 4 |
201 taos> select WEEK(1725095657, 4)
202 week(1725095657, 4) |
203 ========================
204 3 |
205 taos> select WEEK(1725095657, 5)
206 week(1725095657, 5) |
207 ========================
208 3 |
209 taos> select WEEK(1725095657, 6)
210 week(1725095657, 6) |
211 ========================
212 3 |
213 taos> select WEEK(ts) from ts_4893.meters order by ts limit 10
214 week(ts) |
215 ========================
216 28 |
217 28 |
218 28 |
219 28 |
220 28 |
221 28 |
222 28 |
223 28 |
224 28 |
225 28 |
226 taos> select WEEK(ts, 0) from ts_4893.meters order by ts limit 10
227 week(ts, 0) |
228 ========================
229 28 |
230 28 |
231 28 |
232 28 |
233 28 |
234 28 |
235 28 |
236 28 |
237 28 |
238 28 |
239 taos> select WEEK(ts, 1) from ts_4893.meters order by ts limit 10
240 week(ts, 1) |
241 ========================
242 28 |
243 28 |
244 28 |
245 28 |
246 28 |
247 28 |
248 28 |
249 28 |
250 28 |
251 28 |
252 taos> select WEEK(ts, 2) from ts_4893.meters order by ts limit 10
253 week(ts, 2) |
254 ========================
255 28 |
256 28 |
257 28 |
258 28 |
259 28 |
260 28 |
261 28 |
262 28 |
263 28 |
264 28 |
265 taos> select WEEK(ts, 3) from ts_4893.meters order by ts limit 10
266 week(ts, 3) |
267 ========================
268 28 |
269 28 |
270 28 |
271 28 |
272 28 |
273 28 |
274 28 |
275 28 |
276 28 |
277 28 |
278 taos> select WEEK(ts, 4) from ts_4893.meters order by ts limit 10
279 week(ts, 4) |
280 ========================
281 28 |
282 28 |
283 28 |
284 28 |
285 28 |
286 28 |
287 28 |
288 28 |
289 28 |
290 28 |
291 taos> select WEEK(ts, 5) from ts_4893.meters order by ts limit 10
292 week(ts, 5) |
293 ========================
294 28 |
295 28 |
296 28 |
297 28 |
298 28 |
299 28 |
300 28 |
301 28 |
302 28 |
303 28 |
304 taos> select WEEK(ts, 6) from ts_4893.meters order by ts limit 10
305 week(ts, 6) |
306 ========================
307 28 |
308 28 |
309 28 |
310 28 |
311 28 |
312 28 |
313 28 |
314 28 |
315 28 |
316 28 |
317 taos> select WEEK(ts, 7) from ts_4893.meters order by ts limit 10
318 week(ts, 7) |
319 ========================
320 28 |
321 28 |
322 28 |
323 28 |
324 28 |
325 28 |
326 28 |
327 28 |
328 28 |
329 28 |
330 taos> select week(123)
331 week(123) |
332 ========================
333 0 |
334 taos> select week('2000-01-01',0)
335 week('2000-01-01',0) |
336 ========================
337 0 |
338 taos> select week('2000-01-01',1)
339 week('2000-01-01',1) |
340 ========================
341 0 |
342 taos> select week('2000-01-01',2)
343 week('2000-01-01',2) |
344 ========================
345 52 |
346 taos> select week('2000-01-01',3)
347 week('2000-01-01',3) |
348 ========================
349 52 |
350 taos> select week('2000-01-01',4)
351 week('2000-01-01',4) |
352 ========================
353 0 |
354 taos> select week('2000-01-01',5)
355 week('2000-01-01',5) |
356 ========================
357 0 |
358 taos> select week('2000-01-01',6)
359 week('2000-01-01',6) |
360 ========================
361 52 |
362 taos> select week('2000-01-01',7)
363 week('2000-01-01',7) |
364 ========================
365 52 |
366 taos> select week(1721020591,0)
367 week(1721020591,0) |
368 ========================
369 3 |
370 taos> select week('2020-01-01 00:00:00', 2)
371 week('2020-01-01 00:00:00', 2) |
372 =================================
373 52 |
374 taos> select week(ts) from ts_4893.d0 order by ts limit 10
375 week(ts) |
376 ========================
377 28 |
378 28 |
379 28 |
380 28 |
381 28 |
382 28 |
383 28 |
384 28 |
385 28 |
386 28 |
387 taos> select week(ts) from ts_4893.meters order by ts limit 10
388 week(ts) |
389 ========================
390 28 |
391 28 |
392 28 |
393 28 |
394 28 |
395 28 |
396 28 |
397 28 |
398 28 |
399 28 |
400 taos> select week(null, 0)
401 week(null, 0) |
402 ========================
403 NULL |
404 taos> select week('abc')
405 week('abc') |
406 ========================
407 NULL |
408 taos> select week('1721020591', 0)
409 week('1721020591', 0) |
410 ========================
411 NULL |
412 taos> select week('1721020666229', 0)
413 week('1721020666229', 0) |
414 ===========================
415 NULL |
416 taos> select week('20200101', 2)
417 week('20200101', 2) |
418 ========================
419 NULL |
420 taos> select week('11/01/31', 2)
421 week('11/01/31', 2) |
422 ========================
423 NULL |
424 taos> select week('20/01/01', 2)
425 week('20/01/01', 2) |
426 ========================
427 NULL |
428 taos> select week('01/01/2020', 2)
429 week('01/01/2020', 2) |
430 ========================
431 NULL |
432 taos> select week('01-JAN-20', 2)
433 week('01-JAN-20', 2) |
434 ========================
435 NULL |
436 taos> select week('2023-09-25')
437 week('2023-09-25') |
438 ========================
439 39 |
440 taos> select week('9999-12-31')
441 week('9999-12-31') |
442 ========================
443 52 |
444 taos> select week('2024-02-29 00:00:00')
445 week('2024-02-29 00:00:00') |
446 ==============================
447 8 |
448 taos> select week(ts) from ts_4893.meters limit 1
449 week(ts) |
450 ========================
451 28 |
452 taos> select week(name) from ts_4893.meters limit 1
453 week(name) |
454 ========================
455 NULL |
456 taos> select week(ts), dayofweek(ts) from ts_4893.meters limit 1
457 week(ts) | dayofweek(ts) |
458 ================================================
459 28 | 6 |
460 taos> select week(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
461 week(timediff(ts, '2024-10-10 09:36:50.172')) |
462 ================================================
463 39 |
464 taos> select id, week(ts) from ts_4893.meters where id = 1 limit 1
465 id | week(ts) |
466 ======================================
467 1 | 28 |
468 taos> select groupid, sum(week(ts)) from ts_4893.meters group by groupid order by groupid
469 groupid | sum(week(ts)) |
470 ==================================
471 1 | 2669490 |
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565

View File

@ -1,565 +0,0 @@
taos> select WEEK('2020-01-01 00:00:00')
week('2020-01-01 00:00:00') |
==============================
0 |
taos> select WEEK('2020-01-01 00:00:00', 0)
week('2020-01-01 00:00:00', 0) |
=================================
0 |
taos> select WEEK('2020-01-01 00:00:00', 1)
week('2020-01-01 00:00:00', 1) |
=================================
1 |
taos> select WEEK('2020-01-01 00:00:00', 2)
week('2020-01-01 00:00:00', 2) |
=================================
52 |
taos> select WEEK('2020-01-01 00:00:00', 3)
week('2020-01-01 00:00:00', 3) |
=================================
1 |
taos> select WEEK('2020-01-01 00:00:00', 4)
week('2020-01-01 00:00:00', 4) |
=================================
1 |
taos> select WEEK('2020-01-01 00:00:00', 5)
week('2020-01-01 00:00:00', 5) |
=================================
0 |
taos> select WEEK('2020-01-01 00:00:00', 6)
week('2020-01-01 00:00:00', 6) |
=================================
1 |
taos> select WEEK('2020-01-01 00:00:00', 7)
week('2020-01-01 00:00:00', 7) |
=================================
52 |
taos> select WEEK('2021-01-01 00:00:00')
week('2021-01-01 00:00:00') |
==============================
0 |
taos> select WEEK('2021-01-01 00:00:00', 0)
week('2021-01-01 00:00:00', 0) |
=================================
0 |
taos> select WEEK('2021-01-01 00:00:00', 1)
week('2021-01-01 00:00:00', 1) |
=================================
0 |
taos> select WEEK('2021-01-01 00:00:00', 2)
week('2021-01-01 00:00:00', 2) |
=================================
52 |
taos> select WEEK('2021-01-01 00:00:00', 3)
week('2021-01-01 00:00:00', 3) |
=================================
53 |
taos> select WEEK('2021-01-01 00:00:00', 4)
week('2021-01-01 00:00:00', 4) |
=================================
0 |
taos> select WEEK('2021-01-01 00:00:00', 5)
week('2021-01-01 00:00:00', 5) |
=================================
0 |
taos> select WEEK('2021-01-01 00:00:00', 6)
week('2021-01-01 00:00:00', 6) |
=================================
53 |
taos> select WEEK('2021-01-01 00:00:00', 7)
week('2021-01-01 00:00:00', 7) |
=================================
52 |
taos> select WEEK('1998-01-01 00:00:00')
week('1998-01-01 00:00:00') |
==============================
0 |
taos> select WEEK('1998-01-01 00:00:00', 0)
week('1998-01-01 00:00:00', 0) |
=================================
0 |
taos> select WEEK('1998-01-01 00:00:00', 1)
week('1998-01-01 00:00:00', 1) |
=================================
1 |
taos> select WEEK('1998-01-01 00:00:00', 2)
week('1998-01-01 00:00:00', 2) |
=================================
52 |
taos> select WEEK('1998-01-01 00:00:00', 3)
week('1998-01-01 00:00:00', 3) |
=================================
1 |
taos> select WEEK('1998-01-01 00:00:00', 4)
week('1998-01-01 00:00:00', 4) |
=================================
0 |
taos> select WEEK('1998-01-01 00:00:00', 5)
week('1998-01-01 00:00:00', 5) |
=================================
0 |
taos> select WEEK('1998-01-01 00:00:00', 6)
week('1998-01-01 00:00:00', 6) |
=================================
53 |
taos> select WEEK('1998-01-01 00:00:00', 7)
week('1998-01-01 00:00:00', 7) |
=================================
52 |
taos> select WEEK('1998-12-31 00:00:00')
week('1998-12-31 00:00:00') |
==============================
52 |
taos> select WEEK('1998-12-31 00:00:00', 0)
week('1998-12-31 00:00:00', 0) |
=================================
52 |
taos> select WEEK('1998-12-31 00:00:00', 1)
week('1998-12-31 00:00:00', 1) |
=================================
53 |
taos> select WEEK('1998-12-31 00:00:00', 2)
week('1998-12-31 00:00:00', 2) |
=================================
52 |
taos> select WEEK('1998-12-31 00:00:00', 3)
week('1998-12-31 00:00:00', 3) |
=================================
53 |
taos> select WEEK('1998-12-31 00:00:00', 4)
week('1998-12-31 00:00:00', 4) |
=================================
52 |
taos> select WEEK('1998-12-31 00:00:00', 5)
week('1998-12-31 00:00:00', 5) |
=================================
52 |
taos> select WEEK('1998-12-31 00:00:00', 6)
week('1998-12-31 00:00:00', 6) |
=================================
52 |
taos> select WEEK('1998-12-31 00:00:00', 7)
week('1998-12-31 00:00:00', 7) |
=================================
52 |
taos> select WEEK('2000-01-06 00:00:00')
week('2000-01-06 00:00:00') |
==============================
1 |
taos> select WEEK('2000-01-06 00:00:00', 0)
week('2000-01-06 00:00:00', 0) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 1)
week('2000-01-06 00:00:00', 1) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 2)
week('2000-01-06 00:00:00', 2) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 3)
week('2000-01-06 00:00:00', 3) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 4)
week('2000-01-06 00:00:00', 4) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 5)
week('2000-01-06 00:00:00', 5) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 6)
week('2000-01-06 00:00:00', 6) |
=================================
1 |
taos> select WEEK('2000-01-06 00:00:00', 7)
week('2000-01-06 00:00:00', 7) |
=================================
1 |
taos> select WEEK(1725095657)
week(1725095657) |
========================
3 |
taos> select WEEK(1725095657, 0)
week(1725095657, 0) |
========================
3 |
taos> select WEEK(1725095657, 1)
week(1725095657, 1) |
========================
4 |
taos> select WEEK(1725095657, 2)
week(1725095657, 2) |
========================
3 |
taos> select WEEK(1725095657, 3)
week(1725095657, 3) |
========================
4 |
taos> select WEEK(1725095657, 4)
week(1725095657, 4) |
========================
3 |
taos> select WEEK(1725095657, 5)
week(1725095657, 5) |
========================
3 |
taos> select WEEK(1725095657, 6)
week(1725095657, 6) |
========================
3 |
taos> select WEEK(ts) from ts_4893.meters order by ts limit 10
week(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 0) from ts_4893.meters order by ts limit 10
week(ts, 0) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 1) from ts_4893.meters order by ts limit 10
week(ts, 1) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 2) from ts_4893.meters order by ts limit 10
week(ts, 2) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 3) from ts_4893.meters order by ts limit 10
week(ts, 3) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 4) from ts_4893.meters order by ts limit 10
week(ts, 4) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 5) from ts_4893.meters order by ts limit 10
week(ts, 5) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 6) from ts_4893.meters order by ts limit 10
week(ts, 6) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select WEEK(ts, 7) from ts_4893.meters order by ts limit 10
week(ts, 7) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select week(123)
week(123) |
========================
0 |
taos> select week('2000-01-01',0)
week('2000-01-01',0) |
========================
0 |
taos> select week('2000-01-01',1)
week('2000-01-01',1) |
========================
0 |
taos> select week('2000-01-01',2)
week('2000-01-01',2) |
========================
52 |
taos> select week('2000-01-01',3)
week('2000-01-01',3) |
========================
52 |
taos> select week('2000-01-01',4)
week('2000-01-01',4) |
========================
0 |
taos> select week('2000-01-01',5)
week('2000-01-01',5) |
========================
0 |
taos> select week('2000-01-01',6)
week('2000-01-01',6) |
========================
52 |
taos> select week('2000-01-01',7)
week('2000-01-01',7) |
========================
52 |
taos> select week(1721020591,0)
week(1721020591,0) |
========================
3 |
taos> select week('2020-01-01 00:00:00', 2)
week('2020-01-01 00:00:00', 2) |
=================================
52 |
taos> select week(ts) from ts_4893.d0 order by ts limit 10
week(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select week(ts) from ts_4893.meters order by ts limit 10
week(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select week(null, 0)
week(null, 0) |
========================
NULL |
taos> select week('abc')
week('abc') |
========================
NULL |
taos> select week('1721020591', 0)
week('1721020591', 0) |
========================
NULL |
taos> select week('1721020666229', 0)
week('1721020666229', 0) |
===========================
NULL |
taos> select week('20200101', 2)
week('20200101', 2) |
========================
NULL |
taos> select week('11/01/31', 2)
week('11/01/31', 2) |
========================
NULL |
taos> select week('20/01/01', 2)
week('20/01/01', 2) |
========================
NULL |
taos> select week('01/01/2020', 2)
week('01/01/2020', 2) |
========================
NULL |
taos> select week('01-JAN-20', 2)
week('01-JAN-20', 2) |
========================
NULL |
taos> select week('2023-09-25')
week('2023-09-25') |
========================
39 |
taos> select week('9999-12-31')
week('9999-12-31') |
========================
52 |
taos> select week('2024-02-29 00:00:00')
week('2024-02-29 00:00:00') |
==============================
8 |
taos> select week(ts) from ts_4893.meters limit 1
week(ts) |
========================
28 |
taos> select week(name) from ts_4893.meters limit 1
week(name) |
========================
NULL |
taos> select week(ts), dayofweek(ts) from ts_4893.meters limit 1
week(ts) | dayofweek(ts) |
================================================
28 | 6 |
taos> select week(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
week(timediff(ts, '2024-10-10 09:36:50.172')) |
================================================
39 |
taos> select id, week(ts) from ts_4893.meters where id = 1 limit 1
id | week(ts) |
======================================
1 | 28 |
taos> select groupid, sum(week(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(week(ts)) |
==================================
1 | 2669490 |
1 taos> select WEEK('2020-01-01 00:00:00')
2 week('2020-01-01 00:00:00') |
3 ==============================
4 0 |
5 taos> select WEEK('2020-01-01 00:00:00', 0)
6 week('2020-01-01 00:00:00', 0) |
7 =================================
8 0 |
9 taos> select WEEK('2020-01-01 00:00:00', 1)
10 week('2020-01-01 00:00:00', 1) |
11 =================================
12 1 |
13 taos> select WEEK('2020-01-01 00:00:00', 2)
14 week('2020-01-01 00:00:00', 2) |
15 =================================
16 52 |
17 taos> select WEEK('2020-01-01 00:00:00', 3)
18 week('2020-01-01 00:00:00', 3) |
19 =================================
20 1 |
21 taos> select WEEK('2020-01-01 00:00:00', 4)
22 week('2020-01-01 00:00:00', 4) |
23 =================================
24 1 |
25 taos> select WEEK('2020-01-01 00:00:00', 5)
26 week('2020-01-01 00:00:00', 5) |
27 =================================
28 0 |
29 taos> select WEEK('2020-01-01 00:00:00', 6)
30 week('2020-01-01 00:00:00', 6) |
31 =================================
32 1 |
33 taos> select WEEK('2020-01-01 00:00:00', 7)
34 week('2020-01-01 00:00:00', 7) |
35 =================================
36 52 |
37 taos> select WEEK('2021-01-01 00:00:00')
38 week('2021-01-01 00:00:00') |
39 ==============================
40 0 |
41 taos> select WEEK('2021-01-01 00:00:00', 0)
42 week('2021-01-01 00:00:00', 0) |
43 =================================
44 0 |
45 taos> select WEEK('2021-01-01 00:00:00', 1)
46 week('2021-01-01 00:00:00', 1) |
47 =================================
48 0 |
49 taos> select WEEK('2021-01-01 00:00:00', 2)
50 week('2021-01-01 00:00:00', 2) |
51 =================================
52 52 |
53 taos> select WEEK('2021-01-01 00:00:00', 3)
54 week('2021-01-01 00:00:00', 3) |
55 =================================
56 53 |
57 taos> select WEEK('2021-01-01 00:00:00', 4)
58 week('2021-01-01 00:00:00', 4) |
59 =================================
60 0 |
61 taos> select WEEK('2021-01-01 00:00:00', 5)
62 week('2021-01-01 00:00:00', 5) |
63 =================================
64 0 |
65 taos> select WEEK('2021-01-01 00:00:00', 6)
66 week('2021-01-01 00:00:00', 6) |
67 =================================
68 53 |
69 taos> select WEEK('2021-01-01 00:00:00', 7)
70 week('2021-01-01 00:00:00', 7) |
71 =================================
72 52 |
73 taos> select WEEK('1998-01-01 00:00:00')
74 week('1998-01-01 00:00:00') |
75 ==============================
76 0 |
77 taos> select WEEK('1998-01-01 00:00:00', 0)
78 week('1998-01-01 00:00:00', 0) |
79 =================================
80 0 |
81 taos> select WEEK('1998-01-01 00:00:00', 1)
82 week('1998-01-01 00:00:00', 1) |
83 =================================
84 1 |
85 taos> select WEEK('1998-01-01 00:00:00', 2)
86 week('1998-01-01 00:00:00', 2) |
87 =================================
88 52 |
89 taos> select WEEK('1998-01-01 00:00:00', 3)
90 week('1998-01-01 00:00:00', 3) |
91 =================================
92 1 |
93 taos> select WEEK('1998-01-01 00:00:00', 4)
94 week('1998-01-01 00:00:00', 4) |
95 =================================
96 0 |
97 taos> select WEEK('1998-01-01 00:00:00', 5)
98 week('1998-01-01 00:00:00', 5) |
99 =================================
100 0 |
101 taos> select WEEK('1998-01-01 00:00:00', 6)
102 week('1998-01-01 00:00:00', 6) |
103 =================================
104 53 |
105 taos> select WEEK('1998-01-01 00:00:00', 7)
106 week('1998-01-01 00:00:00', 7) |
107 =================================
108 52 |
109 taos> select WEEK('1998-12-31 00:00:00')
110 week('1998-12-31 00:00:00') |
111 ==============================
112 52 |
113 taos> select WEEK('1998-12-31 00:00:00', 0)
114 week('1998-12-31 00:00:00', 0) |
115 =================================
116 52 |
117 taos> select WEEK('1998-12-31 00:00:00', 1)
118 week('1998-12-31 00:00:00', 1) |
119 =================================
120 53 |
121 taos> select WEEK('1998-12-31 00:00:00', 2)
122 week('1998-12-31 00:00:00', 2) |
123 =================================
124 52 |
125 taos> select WEEK('1998-12-31 00:00:00', 3)
126 week('1998-12-31 00:00:00', 3) |
127 =================================
128 53 |
129 taos> select WEEK('1998-12-31 00:00:00', 4)
130 week('1998-12-31 00:00:00', 4) |
131 =================================
132 52 |
133 taos> select WEEK('1998-12-31 00:00:00', 5)
134 week('1998-12-31 00:00:00', 5) |
135 =================================
136 52 |
137 taos> select WEEK('1998-12-31 00:00:00', 6)
138 week('1998-12-31 00:00:00', 6) |
139 =================================
140 52 |
141 taos> select WEEK('1998-12-31 00:00:00', 7)
142 week('1998-12-31 00:00:00', 7) |
143 =================================
144 52 |
145 taos> select WEEK('2000-01-06 00:00:00')
146 week('2000-01-06 00:00:00') |
147 ==============================
148 1 |
149 taos> select WEEK('2000-01-06 00:00:00', 0)
150 week('2000-01-06 00:00:00', 0) |
151 =================================
152 1 |
153 taos> select WEEK('2000-01-06 00:00:00', 1)
154 week('2000-01-06 00:00:00', 1) |
155 =================================
156 1 |
157 taos> select WEEK('2000-01-06 00:00:00', 2)
158 week('2000-01-06 00:00:00', 2) |
159 =================================
160 1 |
161 taos> select WEEK('2000-01-06 00:00:00', 3)
162 week('2000-01-06 00:00:00', 3) |
163 =================================
164 1 |
165 taos> select WEEK('2000-01-06 00:00:00', 4)
166 week('2000-01-06 00:00:00', 4) |
167 =================================
168 1 |
169 taos> select WEEK('2000-01-06 00:00:00', 5)
170 week('2000-01-06 00:00:00', 5) |
171 =================================
172 1 |
173 taos> select WEEK('2000-01-06 00:00:00', 6)
174 week('2000-01-06 00:00:00', 6) |
175 =================================
176 1 |
177 taos> select WEEK('2000-01-06 00:00:00', 7)
178 week('2000-01-06 00:00:00', 7) |
179 =================================
180 1 |
181 taos> select WEEK(1725095657)
182 week(1725095657) |
183 ========================
184 3 |
185 taos> select WEEK(1725095657, 0)
186 week(1725095657, 0) |
187 ========================
188 3 |
189 taos> select WEEK(1725095657, 1)
190 week(1725095657, 1) |
191 ========================
192 4 |
193 taos> select WEEK(1725095657, 2)
194 week(1725095657, 2) |
195 ========================
196 3 |
197 taos> select WEEK(1725095657, 3)
198 week(1725095657, 3) |
199 ========================
200 4 |
201 taos> select WEEK(1725095657, 4)
202 week(1725095657, 4) |
203 ========================
204 3 |
205 taos> select WEEK(1725095657, 5)
206 week(1725095657, 5) |
207 ========================
208 3 |
209 taos> select WEEK(1725095657, 6)
210 week(1725095657, 6) |
211 ========================
212 3 |
213 taos> select WEEK(ts) from ts_4893.meters order by ts limit 10
214 week(ts) |
215 ========================
216 28 |
217 28 |
218 28 |
219 28 |
220 28 |
221 28 |
222 28 |
223 28 |
224 28 |
225 28 |
226 taos> select WEEK(ts, 0) from ts_4893.meters order by ts limit 10
227 week(ts, 0) |
228 ========================
229 28 |
230 28 |
231 28 |
232 28 |
233 28 |
234 28 |
235 28 |
236 28 |
237 28 |
238 28 |
239 taos> select WEEK(ts, 1) from ts_4893.meters order by ts limit 10
240 week(ts, 1) |
241 ========================
242 28 |
243 28 |
244 28 |
245 28 |
246 28 |
247 28 |
248 28 |
249 28 |
250 28 |
251 28 |
252 taos> select WEEK(ts, 2) from ts_4893.meters order by ts limit 10
253 week(ts, 2) |
254 ========================
255 28 |
256 28 |
257 28 |
258 28 |
259 28 |
260 28 |
261 28 |
262 28 |
263 28 |
264 28 |
265 taos> select WEEK(ts, 3) from ts_4893.meters order by ts limit 10
266 week(ts, 3) |
267 ========================
268 28 |
269 28 |
270 28 |
271 28 |
272 28 |
273 28 |
274 28 |
275 28 |
276 28 |
277 28 |
278 taos> select WEEK(ts, 4) from ts_4893.meters order by ts limit 10
279 week(ts, 4) |
280 ========================
281 28 |
282 28 |
283 28 |
284 28 |
285 28 |
286 28 |
287 28 |
288 28 |
289 28 |
290 28 |
291 taos> select WEEK(ts, 5) from ts_4893.meters order by ts limit 10
292 week(ts, 5) |
293 ========================
294 28 |
295 28 |
296 28 |
297 28 |
298 28 |
299 28 |
300 28 |
301 28 |
302 28 |
303 28 |
304 taos> select WEEK(ts, 6) from ts_4893.meters order by ts limit 10
305 week(ts, 6) |
306 ========================
307 28 |
308 28 |
309 28 |
310 28 |
311 28 |
312 28 |
313 28 |
314 28 |
315 28 |
316 28 |
317 taos> select WEEK(ts, 7) from ts_4893.meters order by ts limit 10
318 week(ts, 7) |
319 ========================
320 28 |
321 28 |
322 28 |
323 28 |
324 28 |
325 28 |
326 28 |
327 28 |
328 28 |
329 28 |
330 taos> select week(123)
331 week(123) |
332 ========================
333 0 |
334 taos> select week('2000-01-01',0)
335 week('2000-01-01',0) |
336 ========================
337 0 |
338 taos> select week('2000-01-01',1)
339 week('2000-01-01',1) |
340 ========================
341 0 |
342 taos> select week('2000-01-01',2)
343 week('2000-01-01',2) |
344 ========================
345 52 |
346 taos> select week('2000-01-01',3)
347 week('2000-01-01',3) |
348 ========================
349 52 |
350 taos> select week('2000-01-01',4)
351 week('2000-01-01',4) |
352 ========================
353 0 |
354 taos> select week('2000-01-01',5)
355 week('2000-01-01',5) |
356 ========================
357 0 |
358 taos> select week('2000-01-01',6)
359 week('2000-01-01',6) |
360 ========================
361 52 |
362 taos> select week('2000-01-01',7)
363 week('2000-01-01',7) |
364 ========================
365 52 |
366 taos> select week(1721020591,0)
367 week(1721020591,0) |
368 ========================
369 3 |
370 taos> select week('2020-01-01 00:00:00', 2)
371 week('2020-01-01 00:00:00', 2) |
372 =================================
373 52 |
374 taos> select week(ts) from ts_4893.d0 order by ts limit 10
375 week(ts) |
376 ========================
377 28 |
378 28 |
379 28 |
380 28 |
381 28 |
382 28 |
383 28 |
384 28 |
385 28 |
386 28 |
387 taos> select week(ts) from ts_4893.meters order by ts limit 10
388 week(ts) |
389 ========================
390 28 |
391 28 |
392 28 |
393 28 |
394 28 |
395 28 |
396 28 |
397 28 |
398 28 |
399 28 |
400 taos> select week(null, 0)
401 week(null, 0) |
402 ========================
403 NULL |
404 taos> select week('abc')
405 week('abc') |
406 ========================
407 NULL |
408 taos> select week('1721020591', 0)
409 week('1721020591', 0) |
410 ========================
411 NULL |
412 taos> select week('1721020666229', 0)
413 week('1721020666229', 0) |
414 ===========================
415 NULL |
416 taos> select week('20200101', 2)
417 week('20200101', 2) |
418 ========================
419 NULL |
420 taos> select week('11/01/31', 2)
421 week('11/01/31', 2) |
422 ========================
423 NULL |
424 taos> select week('20/01/01', 2)
425 week('20/01/01', 2) |
426 ========================
427 NULL |
428 taos> select week('01/01/2020', 2)
429 week('01/01/2020', 2) |
430 ========================
431 NULL |
432 taos> select week('01-JAN-20', 2)
433 week('01-JAN-20', 2) |
434 ========================
435 NULL |
436 taos> select week('2023-09-25')
437 week('2023-09-25') |
438 ========================
439 39 |
440 taos> select week('9999-12-31')
441 week('9999-12-31') |
442 ========================
443 52 |
444 taos> select week('2024-02-29 00:00:00')
445 week('2024-02-29 00:00:00') |
446 ==============================
447 8 |
448 taos> select week(ts) from ts_4893.meters limit 1
449 week(ts) |
450 ========================
451 28 |
452 taos> select week(name) from ts_4893.meters limit 1
453 week(name) |
454 ========================
455 NULL |
456 taos> select week(ts), dayofweek(ts) from ts_4893.meters limit 1
457 week(ts) | dayofweek(ts) |
458 ================================================
459 28 | 6 |
460 taos> select week(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
461 week(timediff(ts, '2024-10-10 09:36:50.172')) |
462 ================================================
463 39 |
464 taos> select id, week(ts) from ts_4893.meters where id = 1 limit 1
465 id | week(ts) |
466 ======================================
467 1 | 28 |
468 taos> select groupid, sum(week(ts)) from ts_4893.meters group by groupid order by groupid
469 groupid | sum(week(ts)) |
470 ==================================
471 1 | 2669490 |

View File

@ -1,100 +1,272 @@
2
2 taos> select WEEKDAY('2020-01-01 00:00:00')
2 weekday('2020-01-01 00:00:00') |
2 =================================
2 2 |
2
2 taos> select WEEKDAY('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
2 weekday('2020-01-01 00:00:00') |
2 =================================
2 2 |
2 2 |
4 2 |
4 2 |
4 2 |
4 2 |
4 2 |
4 2 |
4 2 |
4 2 |
4
4 taos> select WEEKDAY('2021-01-01 00:00:00')
4 weekday('2021-01-01 00:00:00') |
3 =================================
3 4 |
3
3 taos> select WEEKDAY('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
3 weekday('2021-01-01 00:00:00') |
3 =================================
3 4 |
3 4 |
3 4 |
3 4 |
3 4 |
3 4 |
3 4 |
3 4 |
3 4 |
3 4 |
3
3 taos> select WEEKDAY('1998-01-01 00:00:00')
3 weekday('1998-01-01 00:00:00') |
3 =================================
3 3 |
3
3 taos> select WEEKDAY('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
3 weekday('1998-01-01 00:00:00') |
3 =================================
3 3 |
3 3 |
3 3 |
3 3 |
3 3 |
3 3 |
3 3 |
3 3 |
2 3 |
2 3 |
2
2 taos> select WEEKDAY('1998-12-31 00:00:00')
2 weekday('1998-12-31 00:00:00') |
2 =================================
2 3 |
2
2 taos> select WEEKDAY('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
2 weekday('1998-12-31 00:00:00') |
2 =================================
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
2
2 taos> select WEEKDAY('2000-01-06 00:00:00')
0 weekday('2000-01-06 00:00:00') |
2 =================================
4 3 |
4
4 taos> select WEEKDAY('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
4 weekday('2000-01-06 00:00:00') |
4 =================================
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4 3 |
4
4 taos> select WEEKDAY(1725095657)
4 weekday(1725095657) |
4 ========================
4 2 |
taos> select WEEKDAY(1725095657) from ts_4893.meters order by ts limit 10
weekday(1725095657) |
========================
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
taos> select WEEKDAY(ts) from ts_4893.meters order by ts limit 10
weekday(ts) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select weekday('2020-01-01')
weekday('2020-01-01') |
========================
2 |
taos> select weekday(1721020591)
weekday(1721020591) |
========================
2 |
taos> select weekday(1721020666229)
weekday(1721020666229) |
=========================
0 |
taos> select weekday('2020-01-01 00:00:00')
weekday('2020-01-01 00:00:00') |
=================================
2 |
taos> select weekday(ts) from ts_4893.d0 order by ts limit 10
weekday(ts) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select weekday(ts) from ts_4893.meters order by ts limit 10
weekday(ts) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select weekday(null)
weekday(null) |
========================
NULL |
taos> select weekday('abc')
weekday('abc') |
========================
NULL |
taos> select weekday('1721020591')
weekday('1721020591') |
========================
NULL |
taos> select weekday('1721020666229')
weekday('1721020666229') |
===========================
NULL |
taos> select weekday('01/01/2020')
weekday('01/01/2020') |
========================
NULL |
taos> select weekday('20200101')
weekday('20200101') |
========================
NULL |
taos> select weekday('20/01/01')
weekday('20/01/01') |
========================
NULL |
taos> select weekday('11/01/32')
weekday('11/01/32') |
========================
NULL |
taos> select weekday('01-JAN-20')
weekday('01-JAN-20') |
========================
NULL |
taos> select weekday('2024-02-29')
weekday('2024-02-29') |
========================
3 |
taos> select weekday('2023-09-24')
weekday('2023-09-24') |
========================
6 |
taos> select weekday('2023-09-25')
weekday('2023-09-25') |
========================
0 |
taos> select weekday('9999-12-31')
weekday('9999-12-31') |
========================
4 |
taos> select weekday(name) from ts_4893.meters limit 1
weekday(name) |
========================
NULL |
taos> select weekday(ts), dayofweek(ts) from ts_4893.meters limit 1
weekday(ts) | dayofweek(ts) |
================================================
4 | 6 |
taos> select weekday(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
weekday(timediff(ts, '2024-10-10 09:36:50.172')) |
===================================================
4 |
taos> select weekday(ts) from ts_4893.meters limit 1
weekday(ts) |
========================
4 |
taos> select id, weekday(ts) from ts_4893.meters where id = 1 limit 1
id | weekday(ts) |
======================================
1 | 4 |
taos> select groupid, sum(weekday(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(weekday(ts)) |
==================================
1 | 300007 |

Can't render this file because it has a wrong number of fields in line 248.

View File

@ -1,272 +0,0 @@
taos> select WEEKDAY('2020-01-01 00:00:00')
weekday('2020-01-01 00:00:00') |
=================================
2 |
taos> select WEEKDAY('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
weekday('2020-01-01 00:00:00') |
=================================
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
taos> select WEEKDAY('2021-01-01 00:00:00')
weekday('2021-01-01 00:00:00') |
=================================
4 |
taos> select WEEKDAY('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
weekday('2021-01-01 00:00:00') |
=================================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select WEEKDAY('1998-01-01 00:00:00')
weekday('1998-01-01 00:00:00') |
=================================
3 |
taos> select WEEKDAY('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
weekday('1998-01-01 00:00:00') |
=================================
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
taos> select WEEKDAY('1998-12-31 00:00:00')
weekday('1998-12-31 00:00:00') |
=================================
3 |
taos> select WEEKDAY('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
weekday('1998-12-31 00:00:00') |
=================================
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
taos> select WEEKDAY('2000-01-06 00:00:00')
weekday('2000-01-06 00:00:00') |
=================================
3 |
taos> select WEEKDAY('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
weekday('2000-01-06 00:00:00') |
=================================
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
taos> select WEEKDAY(1725095657)
weekday(1725095657) |
========================
2 |
taos> select WEEKDAY(1725095657) from ts_4893.meters order by ts limit 10
weekday(1725095657) |
========================
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
taos> select WEEKDAY(ts) from ts_4893.meters order by ts limit 10
weekday(ts) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select weekday('2020-01-01')
weekday('2020-01-01') |
========================
2 |
taos> select weekday(1721020591)
weekday(1721020591) |
========================
2 |
taos> select weekday(1721020666229)
weekday(1721020666229) |
=========================
0 |
taos> select weekday('2020-01-01 00:00:00')
weekday('2020-01-01 00:00:00') |
=================================
2 |
taos> select weekday(ts) from ts_4893.d0 order by ts limit 10
weekday(ts) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select weekday(ts) from ts_4893.meters order by ts limit 10
weekday(ts) |
========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select weekday(null)
weekday(null) |
========================
NULL |
taos> select weekday('abc')
weekday('abc') |
========================
NULL |
taos> select weekday('1721020591')
weekday('1721020591') |
========================
NULL |
taos> select weekday('1721020666229')
weekday('1721020666229') |
===========================
NULL |
taos> select weekday('01/01/2020')
weekday('01/01/2020') |
========================
NULL |
taos> select weekday('20200101')
weekday('20200101') |
========================
NULL |
taos> select weekday('20/01/01')
weekday('20/01/01') |
========================
NULL |
taos> select weekday('11/01/32')
weekday('11/01/32') |
========================
NULL |
taos> select weekday('01-JAN-20')
weekday('01-JAN-20') |
========================
NULL |
taos> select weekday('2024-02-29')
weekday('2024-02-29') |
========================
3 |
taos> select weekday('2023-09-24')
weekday('2023-09-24') |
========================
6 |
taos> select weekday('2023-09-25')
weekday('2023-09-25') |
========================
0 |
taos> select weekday('9999-12-31')
weekday('9999-12-31') |
========================
4 |
taos> select weekday(name) from ts_4893.meters limit 1
weekday(name) |
========================
NULL |
taos> select weekday(ts), dayofweek(ts) from ts_4893.meters limit 1
weekday(ts) | dayofweek(ts) |
================================================
4 | 6 |
taos> select weekday(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
weekday(timediff(ts, '2024-10-10 09:36:50.172')) |
===================================================
4 |
taos> select weekday(ts) from ts_4893.meters limit 1
weekday(ts) |
========================
4 |
taos> select id, weekday(ts) from ts_4893.meters where id = 1 limit 1
id | weekday(ts) |
======================================
1 | 4 |
taos> select groupid, sum(weekday(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(weekday(ts)) |
==================================
1 | 300007 |
Can't render this file because it has a wrong number of fields in line 248.

View File

@ -1,99 +1,267 @@
1
1 taos> select WEEKOFYEAR('2020-01-01 00:00:00')
1 weekofyear('2020-01-01 00:00:00') |
1 ====================================
1 1 |
1
1 taos> select WEEKOFYEAR('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
1 weekofyear('2020-01-01 00:00:00') |
1 ====================================
1 1 |
1 1 |
53 1 |
53 1 |
53 1 |
53 1 |
53 1 |
53 1 |
53 1 |
53 1 |
53
53 taos> select WEEKOFYEAR('2021-01-01 00:00:00')
53 weekofyear('2021-01-01 00:00:00') |
1 ====================================
1 53 |
1
1 taos> select WEEKOFYEAR('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
1 weekofyear('2021-01-01 00:00:00') |
1 ====================================
1 53 |
1 53 |
1 53 |
1 53 |
1 53 |
53 53 |
53 53 |
53 53 |
53 53 |
53 53 |
53
53 taos> select WEEKOFYEAR('1998-01-01 00:00:00')
53 weekofyear('1998-01-01 00:00:00') |
53 ====================================
53 1 |
53
1 taos> select WEEKOFYEAR('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
1 weekofyear('1998-01-01 00:00:00') |
1 ====================================
1 1 |
1 1 |
1 1 |
1 1 |
1 1 |
1 1 |
1 1 |
1 1 |
4 1 |
4 1 |
4
4 taos> select WEEKOFYEAR('1998-12-31 00:00:00')
4 weekofyear('1998-12-31 00:00:00') |
4 ====================================
4 53 |
4
4 taos> select WEEKOFYEAR('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
4 weekofyear('1998-12-31 00:00:00') |
4 ====================================
28 53 |
28 53 |
28 53 |
28 53 |
28 53 |
28 53 |
28 53 |
28 53 |
28 53 |
28 53 |
1
4 taos> select WEEKOFYEAR('2000-01-06 00:00:00')
29 weekofyear('2000-01-06 00:00:00') |
28 ====================================
28 1 |
28
28 taos> select WEEKOFYEAR('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
28 weekofyear('2000-01-06 00:00:00') |
28 ====================================
28 1 |
28 1 |
28 1 |
28 1 |
28 1 |
28 1 |
28 1 |
28 1 |
28 1 |
28 1 |
28
28 taos> select WEEKOFYEAR(1725095657)
28 weekofyear(1725095657) |
28 =========================
4 |
taos> select WEEKOFYEAR(1725095657) from ts_4893.meters order by ts limit 10
weekofyear(1725095657) |
=========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select WEEKOFYEAR(ts) from ts_4893.meters order by ts limit 10
weekofyear(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select weekofyear('2020-01-01')
weekofyear('2020-01-01') |
===========================
1 |
taos> select weekofyear(1721020666)
weekofyear(1721020666) |
=========================
4 |
taos> select weekofyear(1721020666229)
weekofyear(1721020666229) |
============================
29 |
taos> select weekofyear(ts) from ts_4893.d0 order by ts limit 10
weekofyear(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select weekofyear(ts) from ts_4893.meters order by ts limit 10
weekofyear(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select weekofyear(null)
weekofyear(null) |
========================
NULL |
taos> select weekofyear('1721020591')
weekofyear('1721020591') |
===========================
NULL |
taos> select weekofyear('1721020666229')
weekofyear('1721020666229') |
==============================
NULL |
taos> select weekofyear('abc')
weekofyear('abc') |
========================
NULL |
taos> select weekofyear('01/01/2020')
weekofyear('01/01/2020') |
===========================
NULL |
taos> select weekofyear('20200101')
weekofyear('20200101') |
=========================
NULL |
taos> select weekofyear('20/01/01')
weekofyear('20/01/01') |
=========================
NULL |
taos> select weekofyear('11/01/31')
weekofyear('11/01/31') |
=========================
NULL |
taos> select weekofyear('01-JAN-20')
weekofyear('01-JAN-20') |
==========================
NULL |
taos> select weekofyear('2024-02-29')
weekofyear('2024-02-29') |
===========================
9 |
taos> select weekofyear('2024-01-01')
weekofyear('2024-01-01') |
===========================
1 |
taos> select weekofyear('2024-12-31')
weekofyear('2024-12-31') |
===========================
1 |
taos> select weekofyear('9999-12-31')
weekofyear('9999-12-31') |
===========================
52 |
taos> select weekofyear(name) from ts_4893.meters limit 1
weekofyear(name) |
========================
NULL |
taos> select weekofyear(ts) from ts_4893.meters limit 1
weekofyear(ts) |
========================
28 |
taos> select weekofyear(ts), dayofweek(ts) from ts_4893.meters limit 1
weekofyear(ts) | dayofweek(ts) |
================================================
28 | 6 |
taos> select weekofyear(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
weekofyear(timediff(ts, '2024-10-10 09:36:50.172')) |
======================================================
40 |
taos> select id, weekofyear(ts) from ts_4893.meters where id = 1 limit 1
id | weekofyear(ts) |
======================================
1 | 28 |
taos> select groupid, sum(weekofyear(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(weekofyear(ts)) |
==================================
1 | 2720120 |

Can't render this file because it has a wrong number of fields in line 248.

View File

@ -1,267 +0,0 @@
taos> select WEEKOFYEAR('2020-01-01 00:00:00')
weekofyear('2020-01-01 00:00:00') |
====================================
1 |
taos> select WEEKOFYEAR('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
weekofyear('2020-01-01 00:00:00') |
====================================
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
taos> select WEEKOFYEAR('2021-01-01 00:00:00')
weekofyear('2021-01-01 00:00:00') |
====================================
53 |
taos> select WEEKOFYEAR('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
weekofyear('2021-01-01 00:00:00') |
====================================
53 |
53 |
53 |
53 |
53 |
53 |
53 |
53 |
53 |
53 |
taos> select WEEKOFYEAR('1998-01-01 00:00:00')
weekofyear('1998-01-01 00:00:00') |
====================================
1 |
taos> select WEEKOFYEAR('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
weekofyear('1998-01-01 00:00:00') |
====================================
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
taos> select WEEKOFYEAR('1998-12-31 00:00:00')
weekofyear('1998-12-31 00:00:00') |
====================================
53 |
taos> select WEEKOFYEAR('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
weekofyear('1998-12-31 00:00:00') |
====================================
53 |
53 |
53 |
53 |
53 |
53 |
53 |
53 |
53 |
53 |
taos> select WEEKOFYEAR('2000-01-06 00:00:00')
weekofyear('2000-01-06 00:00:00') |
====================================
1 |
taos> select WEEKOFYEAR('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
weekofyear('2000-01-06 00:00:00') |
====================================
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
taos> select WEEKOFYEAR(1725095657)
weekofyear(1725095657) |
=========================
4 |
taos> select WEEKOFYEAR(1725095657) from ts_4893.meters order by ts limit 10
weekofyear(1725095657) |
=========================
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
4 |
taos> select WEEKOFYEAR(ts) from ts_4893.meters order by ts limit 10
weekofyear(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select weekofyear('2020-01-01')
weekofyear('2020-01-01') |
===========================
1 |
taos> select weekofyear(1721020666)
weekofyear(1721020666) |
=========================
4 |
taos> select weekofyear(1721020666229)
weekofyear(1721020666229) |
============================
29 |
taos> select weekofyear(ts) from ts_4893.d0 order by ts limit 10
weekofyear(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select weekofyear(ts) from ts_4893.meters order by ts limit 10
weekofyear(ts) |
========================
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
28 |
taos> select weekofyear(null)
weekofyear(null) |
========================
NULL |
taos> select weekofyear('1721020591')
weekofyear('1721020591') |
===========================
NULL |
taos> select weekofyear('1721020666229')
weekofyear('1721020666229') |
==============================
NULL |
taos> select weekofyear('abc')
weekofyear('abc') |
========================
NULL |
taos> select weekofyear('01/01/2020')
weekofyear('01/01/2020') |
===========================
NULL |
taos> select weekofyear('20200101')
weekofyear('20200101') |
=========================
NULL |
taos> select weekofyear('20/01/01')
weekofyear('20/01/01') |
=========================
NULL |
taos> select weekofyear('11/01/31')
weekofyear('11/01/31') |
=========================
NULL |
taos> select weekofyear('01-JAN-20')
weekofyear('01-JAN-20') |
==========================
NULL |
taos> select weekofyear('2024-02-29')
weekofyear('2024-02-29') |
===========================
9 |
taos> select weekofyear('2024-01-01')
weekofyear('2024-01-01') |
===========================
1 |
taos> select weekofyear('2024-12-31')
weekofyear('2024-12-31') |
===========================
1 |
taos> select weekofyear('9999-12-31')
weekofyear('9999-12-31') |
===========================
52 |
taos> select weekofyear(name) from ts_4893.meters limit 1
weekofyear(name) |
========================
NULL |
taos> select weekofyear(ts) from ts_4893.meters limit 1
weekofyear(ts) |
========================
28 |
taos> select weekofyear(ts), dayofweek(ts) from ts_4893.meters limit 1
weekofyear(ts) | dayofweek(ts) |
================================================
28 | 6 |
taos> select weekofyear(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
weekofyear(timediff(ts, '2024-10-10 09:36:50.172')) |
======================================================
40 |
taos> select id, weekofyear(ts) from ts_4893.meters where id = 1 limit 1
id | weekofyear(ts) |
======================================
1 | 28 |
taos> select groupid, sum(weekofyear(ts)) from ts_4893.meters group by groupid order by groupid
groupid | sum(weekofyear(ts)) |
==================================
1 | 2720120 |
Can't render this file because it has a wrong number of fields in line 248.

View File

@ -76,7 +76,7 @@ class TDTestCase(TBase):
# read sql from .sql file and execute # read sql from .sql file and execute
tdLog.info("test normal query.") tdLog.info("test normal query.")
self.sqlFile = etool.curFile(__file__, f"in/{testCase}.in") self.sqlFile = etool.curFile(__file__, f"in/{testCase}.in")
self.ansFile = etool.curFile(__file__, f"ans/{testCase}_1.csv") self.ansFile = etool.curFile(__file__, f"ans/{testCase}.csv")
tdCom.compare_testcase_result(self.sqlFile, self.ansFile, testCase) tdCom.compare_testcase_result(self.sqlFile, self.ansFile, testCase)