Merge pull request #27892 from taosdata/test/3.0/TS-4893
Add function CI test cases
This commit is contained in:
commit
c968b87ac6
|
@ -1,112 +1,302 @@
|
|||
104
|
||||
104
|
||||
104
|
||||
104
|
||||
229
|
||||
105.000000000000000
|
||||
103.000000000000000
|
||||
104
|
||||
104
|
||||
104
|
||||
104
|
||||
104
|
||||
105.000000000000000
|
||||
2.080000000000000e+02
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
110
|
||||
112
|
||||
110
|
||||
112
|
||||
228
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
12100.000000000000000
|
||||
51984.000000000000000
|
||||
13689.000000000000000
|
||||
12544.000000000000000
|
||||
12100.000000000000000
|
||||
10.488088481701515
|
||||
15.099668870541500
|
||||
10.816653826391969
|
||||
10.583005244258363
|
||||
10.488088481701515
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
116
|
||||
116
|
||||
39
|
||||
108
|
||||
120
|
||||
108
|
||||
120
|
||||
108
|
||||
116
|
||||
104
|
||||
116
|
||||
116
|
||||
104
|
||||
108
|
||||
120
|
||||
108
|
||||
120
|
||||
108
|
||||
116
|
||||
104
|
||||
116
|
||||
116
|
||||
104
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
110
|
||||
97
|
||||
228
|
||||
110
|
||||
97
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
110
|
||||
97
|
||||
228
|
||||
110
|
||||
97
|
||||
110
|
||||
112
|
||||
110
|
||||
112
|
||||
228
|
||||
117
|
||||
112
|
||||
112
|
||||
112
|
||||
112
|
||||
110
|
||||
112
|
||||
110
|
||||
112
|
||||
228
|
||||
117
|
||||
112
|
||||
112
|
||||
112
|
||||
112
|
||||
|
||||
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.
|
|
@ -1,43 +1,129 @@
|
|||
M
|
||||
M
|
||||
d
|
||||
M
|
||||
M
|
||||
M
|
||||
M
|
||||
M
|
||||
MNOPQ
|
||||
MNOPQ
|
||||
MNOPQ
|
||||
MNOPQ
|
||||
MNOPQ
|
||||
MM
|
||||
MM
|
||||
MM
|
||||
MM
|
||||
MM
|
||||
MN
|
||||
MN
|
||||
MN
|
||||
MN
|
||||
MN
|
||||
1
|
||||
M
|
||||
N
|
||||
O
|
||||
P
|
||||
Q
|
||||
MMM
|
||||
NNN
|
||||
OOO
|
||||
PPP
|
||||
QQQ
|
||||
MMMMM
|
||||
NNNNN
|
||||
OOOOO
|
||||
PPPPP
|
||||
QQQQQ
|
||||
M
|
||||
MM
|
||||
{
|
||||
M{
|
||||
|
||||
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.
|
|
@ -1,93 +1,259 @@
|
|||
5
|
||||
11
|
||||
12
|
||||
18
|
||||
12
|
||||
6.000000000000000
|
||||
4.000000000000000
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
6.000000000000000
|
||||
1.000000000000000e+01
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
6
|
||||
5
|
||||
5
|
||||
10
|
||||
10
|
||||
16
|
||||
11
|
||||
12
|
||||
15
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
25.000000000000000
|
||||
100.000000000000000
|
||||
36.000000000000000
|
||||
49.000000000000000
|
||||
25.000000000000000
|
||||
2.236067977499790
|
||||
3.162277660168380
|
||||
2.449489742783178
|
||||
2.645751311064591
|
||||
2.236067977499790
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
4
|
||||
2
|
||||
6
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
5
|
||||
10
|
||||
5
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
5
|
||||
10
|
||||
5
|
||||
5
|
||||
5
|
||||
6
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
6
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
6
|
||||
7
|
||||
5
|
||||
|
||||
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.
|
|
@ -1,99 +1,262 @@
|
|||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
4
|
||||
4
|
||||
2
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
|
||||
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.
|
|
@ -1,66 +1,270 @@
|
|||
0.000000000000000
|
||||
57.295779513082323
|
||||
85.943669269623484
|
||||
5729.577951308232514
|
||||
-57.295779513082323
|
||||
-85.943669269623484
|
||||
-5729.577951308232514
|
||||
58.295779513082323
|
||||
56.295779513082323
|
||||
57.295779513082323
|
||||
57.295779513082323
|
||||
57.295779513082323
|
||||
57.295779513082323
|
||||
57.295779513082323
|
||||
57.295779513082323
|
||||
57.295779513082323
|
||||
58.295779513082323
|
||||
56.295779513082323
|
||||
114.591559026164646
|
||||
28.647889756541161
|
||||
171.887338539246969
|
||||
57.295779513082323
|
||||
6565.612700023488287
|
||||
2.000000000000000
|
||||
57.295779513082323
|
||||
58.295779513082323
|
||||
59.295779513082323
|
||||
60.295779513082323
|
||||
61.295779513082323
|
||||
0.000000000000000
|
||||
58.295779513082323
|
||||
116.591559026164646
|
||||
174.887338539246969
|
||||
233.183118052329291
|
||||
572.957795130823229
|
||||
180.000000000000000
|
||||
572.957795130823229
|
||||
328280.635001174407080
|
||||
23.936536824085962
|
||||
572
|
||||
0.000000000000000
|
||||
57.295779513082323
|
||||
81.028468454139556
|
||||
99.239201175922574
|
||||
114.591559026164646
|
||||
180
|
||||
610.200029957721426
|
||||
491.254034090376820
|
||||
561.212164701962479
|
||||
643.603479905018958
|
||||
613.408634263739941
|
||||
487.472513516777667
|
||||
549.810284033650078
|
||||
628.076328902558998
|
||||
643.202411196955836
|
||||
592.266466706882511
|
||||
610.200029957721426
|
||||
491.254034090376820
|
||||
561.212164701962479
|
||||
643.603479905018958
|
||||
613.408634263739941
|
||||
487.472513516777667
|
||||
549.810284033650078
|
||||
628.076328902558998
|
||||
643.202411196955836
|
||||
592.266466706882511
|
||||
|
||||
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.
|
|
@ -1,66 +1,260 @@
|
|||
1.000000000000000
|
||||
2.718281828459045
|
||||
4.481689070338065
|
||||
2.688117141816136e+43
|
||||
0.367879441171442
|
||||
0.223130160148430
|
||||
0.000000000000000
|
||||
3.718281828459045
|
||||
1.718281828459045
|
||||
2.718281828459045
|
||||
2.718281828459045
|
||||
2.718281828459045
|
||||
2.718281828459045
|
||||
2.718281828459045
|
||||
2.718281828459045
|
||||
2.718281828459045
|
||||
3.718281828459045
|
||||
1.718281828459045
|
||||
5.436563656918090
|
||||
1.359140914229523
|
||||
10.107337927389695
|
||||
4.670774270471606
|
||||
20.085536923187668
|
||||
2.718281828459046
|
||||
2.718281828459045
|
||||
3.718281828459045
|
||||
4.718281828459045
|
||||
5.718281828459045
|
||||
6.718281828459045
|
||||
1.000000000000000
|
||||
3.718281828459045
|
||||
9.389056098930650
|
||||
23.085536923187668
|
||||
58.598150033144236
|
||||
22026.465794806717895
|
||||
485165195.409790337085724
|
||||
148.413159102576600
|
||||
22026
|
||||
1.000000000000000
|
||||
2.718281828459045
|
||||
4.113250378782928
|
||||
5.652233674034091
|
||||
7.389056098930650
|
||||
3814279.104760214220732
|
||||
7.38905609893065
|
||||
1.6487212707001282
|
||||
42192.578453635847836
|
||||
5292.258432380726845
|
||||
17943.802618770550907
|
||||
75583.992598717435612
|
||||
44622.804904812772293
|
||||
4954.246535954979663
|
||||
14705.836248958077704
|
||||
57641.604897186582093
|
||||
75056.754435561466380
|
||||
30853.327779395312973
|
||||
42192.578453635847836
|
||||
5292.258432380726845
|
||||
17943.802618770550907
|
||||
75583.992598717435612
|
||||
44622.804904812772293
|
||||
4954.246535954979663
|
||||
14705.836248958077704
|
||||
57641.604897186582093
|
||||
75056.754435561466380
|
||||
30853.327779395312973
|
||||
|
||||
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.
|
|
@ -1,63 +1,265 @@
|
|||
4.605170185988092
|
||||
0.405465108108164
|
||||
4.605170185988092
|
||||
5.605170185988092
|
||||
3.605170185988092
|
||||
4.605170185988092
|
||||
4.605170185988092
|
||||
4.605170185988092
|
||||
4.605170185988092
|
||||
4.605170185988092
|
||||
4.605170185988092
|
||||
4.605170185988092
|
||||
5.605170185988092
|
||||
3.605170185988092
|
||||
9.210340371976184
|
||||
2.302585092994046
|
||||
5.298317366548037
|
||||
-3.912023005428146
|
||||
3.192060730416365
|
||||
0.150514997831991
|
||||
4.605170185988092
|
||||
5.605170185988092
|
||||
6.605170185988092
|
||||
7.605170185988092
|
||||
8.605170185988092
|
||||
0.000000000000000
|
||||
1.693147180559945
|
||||
3.098612288668110
|
||||
4.386294361119891
|
||||
5.609437912434101
|
||||
2.302585092994046
|
||||
5.301898110478399
|
||||
1.517427129385146
|
||||
2
|
||||
0.000000000000000
|
||||
0.693147180559945
|
||||
0.881373587019543
|
||||
1.005052538742381
|
||||
1.098612288668110
|
||||
-0.226079864157595
|
||||
2.000000000000000
|
||||
2.302585092994046
|
||||
1.144729885849400
|
||||
2.365559856336680
|
||||
2.148734409997751
|
||||
2.281872059185575
|
||||
2.418855857000369
|
||||
2.370804362614190
|
||||
2.141006941277850
|
||||
2.261346315560232
|
||||
2.394434736880126
|
||||
2.418232501568406
|
||||
2.335729681253415
|
||||
2.365559856336680
|
||||
2.148734409997751
|
||||
2.281872059185575
|
||||
2.418855857000369
|
||||
2.370804362614190
|
||||
2.141006941277850
|
||||
2.261346315560232
|
||||
2.394434736880126
|
||||
2.418232501568406
|
||||
2.335729681253415
|
||||
|
||||
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
File diff suppressed because it is too large
Load Diff
|
@ -1,72 +1,235 @@
|
|||
1.550000000000001
|
||||
0.550000000000001
|
||||
0.550000000000001
|
||||
0.550000000000001
|
||||
0.550000000000001
|
||||
-0.550000000000001
|
||||
0.000000000000000
|
||||
1.550000000000001
|
||||
1.234567890000022e-01
|
||||
1.234567910432816e-01
|
||||
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
|
||||
0.649999618530273
|
||||
0.574000358581543
|
||||
0.795000076293945
|
||||
3.232999801635742
|
||||
0.706000328063965
|
||||
2.508000373840332
|
||||
2.595999717712402
|
||||
2.961999893188477
|
||||
2.225999832153320
|
||||
0.336999893188477
|
||||
0.649999618530273
|
||||
0.574000358581543
|
||||
0.795000076293945
|
||||
0.232999801635742
|
||||
0.706000328063965
|
||||
0.508000373840332
|
||||
0.595999717712402
|
||||
0.961999893188477
|
||||
0.225999832153320
|
||||
0.336999893188477
|
||||
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
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
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,28 +1,194 @@
|
|||
3.141592653589793
|
||||
4.141592653589793
|
||||
2.141592653589793
|
||||
6.283185307179586
|
||||
1.570796326794897
|
||||
3.141592653589793
|
||||
3.141592653589793
|
||||
3.141592653589793
|
||||
3.141592653589793
|
||||
3.141592653589793
|
||||
4.141592653589793
|
||||
2.141592653589793
|
||||
6.283185307179586
|
||||
1.570796326794897
|
||||
6.283185307179586
|
||||
0.000000000000000
|
||||
9.869604401089358
|
||||
1.000000000000000
|
||||
3.141592653589793
|
||||
4.141592653589793
|
||||
5.141592653589793
|
||||
6.141592653589793
|
||||
7.141592653589793
|
||||
3.141592653589793
|
||||
9.869604401089358
|
||||
1.772453850905516
|
||||
3
|
||||
3.141592653589793
|
||||
|
||||
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.
|
|
@ -1,114 +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 |
|
||||
|
Can't render this file because it has a wrong number of fields in line 90.
|
|
@ -1,176 +1,447 @@
|
|||
1
|
||||
3
|
||||
1
|
||||
0
|
||||
14
|
||||
0
|
||||
7
|
||||
1
|
||||
1
|
||||
0
|
||||
4
|
||||
2
|
||||
5
|
||||
4
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
4
|
||||
5
|
||||
4
|
||||
1
|
||||
3
|
||||
4
|
||||
0
|
||||
0
|
||||
5
|
||||
0
|
||||
4
|
||||
4
|
||||
1
|
||||
1
|
||||
3
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
3
|
||||
2
|
||||
1
|
||||
4
|
||||
3
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
1
|
||||
1
|
||||
3
|
||||
1
|
||||
3
|
||||
4
|
||||
3
|
||||
4
|
||||
4
|
||||
1
|
||||
1
|
||||
4
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
4
|
||||
1
|
||||
1
|
||||
6
|
||||
3
|
||||
5
|
||||
5
|
||||
4
|
||||
5
|
||||
5
|
||||
2
|
||||
7
|
||||
2
|
||||
4
|
||||
1
|
||||
1
|
||||
4
|
||||
1
|
||||
4
|
||||
1
|
||||
4
|
||||
4
|
||||
1
|
||||
1
|
||||
1.000000000000000e+00
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
5
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
5
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
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.
|
|
@ -1,66 +1,275 @@
|
|||
0.000000000000000
|
||||
0.017453292519943
|
||||
0.026179938779915
|
||||
1.745329251994330
|
||||
-0.017453292519943
|
||||
-0.026179938779915
|
||||
-1.745329251994330
|
||||
1.017453292519943
|
||||
-0.982546707480057
|
||||
0.017453292519943
|
||||
0.017453292519943
|
||||
0.017453292519943
|
||||
0.017453292519943
|
||||
0.017453292519943
|
||||
0.017453292519943
|
||||
0.017453292519943
|
||||
1.017453292519943
|
||||
-0.982546707480057
|
||||
0.034906585039887
|
||||
0.008726646259972
|
||||
0.052359877559830
|
||||
0.017453292519943
|
||||
0.000609234839573
|
||||
2.000000000000000
|
||||
0.017453292519943
|
||||
1.017453292519943
|
||||
2.017453292519943
|
||||
3.017453292519943
|
||||
4.017453292519943
|
||||
0.000000000000000
|
||||
1.017453292519943
|
||||
2.034906585039887
|
||||
3.052359877559830
|
||||
4.069813170079773
|
||||
0.174532925199433
|
||||
3.141592653589793
|
||||
0.174532925199433
|
||||
0.030461741978671
|
||||
0.417771379105167
|
||||
0
|
||||
0.000000000000000
|
||||
0.017453292519943
|
||||
0.024682682989769
|
||||
0.030229989403904
|
||||
0.034906585039887
|
||||
3.141592653589793
|
||||
0.185877558679493
|
||||
0.149644536324422
|
||||
0.170955001564425
|
||||
0.196052831414414
|
||||
0.186854955444309
|
||||
0.148492619284422
|
||||
0.167481790094528
|
||||
0.191322990739406
|
||||
0.195930658899406
|
||||
0.180414682914441
|
||||
0.185877558679493
|
||||
0.149644536324422
|
||||
0.170955001564425
|
||||
0.196052831414414
|
||||
0.186854955444309
|
||||
0.148492619284422
|
||||
0.167481790094528
|
||||
0.191322990739406
|
||||
0.195930658899406
|
||||
0.180414682914441
|
||||
|
||||
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.
|
|
@ -1,21 +1,173 @@
|
|||
0.663936012733698
|
||||
0.840187717154710
|
||||
0.840187717154710
|
||||
0.700976369297587
|
||||
0.561380175203728
|
||||
0.916457875592847
|
||||
0.274745596235034
|
||||
0.135438768721856
|
||||
0.486904139391568
|
||||
0.352760728612896
|
||||
0.206965447965528
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
0.419929514834624
|
||||
|
||||
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.
|
|
@ -1,161 +1,396 @@
|
|||
hello
|
||||
hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello
|
||||
aa
|
||||
g;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddh
|
||||
gaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc;ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddh
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc;ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddgh
|
||||
6400
|
||||
50060
|
||||
北京taos北京taos北京taos北京taos北京taos北京taos
|
||||
novelnovelnovelnovelnovelnovel
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdateupdateupdateupdate
|
||||
prisionprisionprisionprisionprisionprision
|
||||
novelnovelnovelnovelnovelnovel
|
||||
novelnovelnovelnovelnovelnovel
|
||||
personpersonpersonpersonpersonperson
|
||||
novelnovelnovelnovelnovelnovel
|
||||
plateplateplateplateplateplate
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
一二三四五六七八九十
|
||||
updateupdate
|
||||
prisionprisionprision
|
||||
novelnovelnovelnovel
|
||||
novelnovelnovelnovelnovel
|
||||
person
|
||||
novelnovel
|
||||
plateplateplate
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdateupdateupdate
|
||||
nch1
|
||||
nch1nch1
|
||||
nch1nch1nch1
|
||||
nch1nch1nch1nch1
|
||||
nch1nch1nch1nch1nch1
|
||||
var1
|
||||
var1var1
|
||||
var1var1var1
|
||||
var1var1var1var1
|
||||
var1var1var1var1var1
|
||||
taos
|
||||
taostaos
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
taostaostaos
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
taostaostaos
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
novelnovelnovel
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
novelnovelnovel
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
novelnovelnovel
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
novelnovelnovel
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
novelnovelnovel
|
||||
personpersonperson
|
||||
novelnovelnovel
|
||||
plateplateplate
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
personpersonperson
|
||||
prisionprisionprision
|
||||
plateplateplate
|
||||
novelnovelnovel
|
||||
personpersonperson
|
||||
novelnovelnovel
|
||||
plateplateplate
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
personpersonperson
|
||||
prisionprisionprision
|
||||
plateplateplate
|
||||
lili
|
||||
x
|
||||
lili
|
||||
x
|
||||
lili
|
||||
taos
|
||||
haha
|
||||
taos
|
||||
taos
|
||||
haha
|
||||
lili
|
||||
x
|
||||
lili
|
||||
x
|
||||
lili
|
||||
taos
|
||||
haha
|
||||
taos
|
||||
taos
|
||||
haha
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
|
||||
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
|
@ -1,94 +1,310 @@
|
|||
10.550000000000001
|
||||
10.550000000000001
|
||||
10.600000000000000
|
||||
11.000000000000000
|
||||
11.000000000000000
|
||||
10.000000000000000
|
||||
0.000000000000000
|
||||
-10.600000000000000
|
||||
99
|
||||
111.000000000000000
|
||||
112.000000000000000
|
||||
12.000000000000000
|
||||
11.600000000000000
|
||||
1.230000000000000e+02
|
||||
1.230000000000000e+08
|
||||
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
|
||||
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
|
||||
11.0000000
|
||||
8.6000004
|
||||
9.8000002
|
||||
11.2329998
|
||||
10.7060003
|
||||
8.5080004
|
||||
9.5959997
|
||||
10.9619999
|
||||
11.2259998
|
||||
10.3369999
|
||||
10.6999998
|
||||
8.6000004
|
||||
9.8000002
|
||||
11.1999998
|
||||
10.6999998
|
||||
8.5000000
|
||||
9.6000004
|
||||
11.0000000
|
||||
11.1999998
|
||||
10.3000002
|
||||
10.55
|
||||
10.55
|
||||
10.6
|
||||
11
|
||||
11
|
||||
10
|
||||
0
|
||||
-10.6
|
||||
99
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
10
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
10
|
||||
|
||||
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,70 +1,275 @@
|
|||
0
|
||||
1
|
||||
1.000000000000000
|
||||
1
|
||||
-1
|
||||
-1.000000000000000
|
||||
-1
|
||||
2.000000000000000
|
||||
0.000000000000000
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
2.000000000000000
|
||||
0.000000000000000
|
||||
2.000000000000000
|
||||
0.500000000000000
|
||||
2.000000000000000
|
||||
0.000000000000000
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
2.000000000000000
|
||||
3.000000000000000
|
||||
4.000000000000000
|
||||
5.000000000000000
|
||||
0.000000000000000
|
||||
2.000000000000000
|
||||
3.000000000000000
|
||||
4.000000000000000
|
||||
5.000000000000000
|
||||
1
|
||||
1
|
||||
1
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
1
|
||||
0.000000000000000
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
0
|
||||
1
|
||||
1
|
||||
-1
|
||||
-1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
|
||||
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.
|
|
@ -1,37 +1,138 @@
|
|||
1.154339668872968
|
||||
0.838273408289688
|
||||
0.838639277789964
|
||||
0.839707477142887
|
||||
0.839707477142887
|
||||
0.840565842326812
|
||||
0.844574982206356
|
||||
0.846680761198646
|
||||
0.847012832740021
|
||||
0.847182714923875
|
||||
0.848223610563542
|
||||
2886.751331514371941
|
||||
4.609772228646444
|
||||
8.366600265340756
|
||||
8.366600265340756
|
||||
8.366600265340756
|
||||
8.366600265340756
|
||||
8.077747210701755
|
||||
8.366600265340756
|
||||
8.366600265340756
|
||||
8.366600265340756
|
||||
8.366600265340756
|
||||
2857.595142773027419
|
||||
4.609772228646444
|
||||
5.477225575051661
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
2886.751331514371941
|
||||
2886.751331514371941
|
||||
1.154339668872967
|
||||
1.154339668872967
|
||||
|
||||
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
File diff suppressed because it is too large
Load Diff
|
@ -1,129 +1,343 @@
|
|||
10.550000000000001
|
||||
10.550000000000001
|
||||
10.500000000000000
|
||||
10.000000000000000
|
||||
10.000000000000000
|
||||
0.000000000000000
|
||||
-10.500000000000000
|
||||
99
|
||||
11.500000000000000
|
||||
1.231230000000000e+02
|
||||
1.200000000000000e+08
|
||||
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
|
||||
10.0000000
|
||||
8.5000000
|
||||
9.7900000
|
||||
11.2329998
|
||||
10.7060003
|
||||
8.5080004
|
||||
9.5959997
|
||||
10.9619999
|
||||
11.2259998
|
||||
10.3369999
|
||||
10.6000004
|
||||
8.5000000
|
||||
9.6999998
|
||||
11.1999998
|
||||
10.6999998
|
||||
8.5000000
|
||||
9.5000000
|
||||
10.8999996
|
||||
11.1999998
|
||||
10.3000002
|
||||
10.550000000000001
|
||||
10.550000000000001
|
||||
10.500000000000000
|
||||
10.000000000000000
|
||||
10.000000000000000
|
||||
0.000000000000000
|
||||
-10.500000000000000
|
||||
99
|
||||
11.500000000000000
|
||||
1.231230000000000e+02
|
||||
1.200000000000000e+08
|
||||
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
|
||||
10.0000000
|
||||
8.5000000
|
||||
9.7900000
|
||||
11.2329998
|
||||
10.7060003
|
||||
8.5080004
|
||||
9.5959997
|
||||
10.9619999
|
||||
11.2259998
|
||||
10.3369999
|
||||
10.6000004
|
||||
8.5000000
|
||||
9.6999998
|
||||
11.1999998
|
||||
10.6999998
|
||||
8.5000000
|
||||
9.5000000
|
||||
10.8999996
|
||||
11.1999998
|
||||
10.3000002
|
||||
99.99
|
||||
99.99
|
||||
99.9
|
||||
99
|
||||
90
|
||||
0
|
||||
99
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
|
||||
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,37 +1,128 @@
|
|||
1.332500071133753
|
||||
0.702702307045610
|
||||
0.703315838252072
|
||||
0.705108647169672
|
||||
0.705108647169672
|
||||
0.706550935286583
|
||||
0.713306900568867
|
||||
0.716868311383919
|
||||
0.717430738826275
|
||||
0.717718552465788
|
||||
0.719483293517451
|
||||
8333333.250000000000000
|
||||
21.250000000000000
|
||||
70.000000000000000
|
||||
70.000000000000000
|
||||
70.000000000000000
|
||||
70.000000000000000
|
||||
65.250000000000000
|
||||
70.000000000000000
|
||||
70.000000000000000
|
||||
70.000000000000000
|
||||
70.000000000000000
|
||||
8165850.000000000000000
|
||||
21.250000000000000
|
||||
30.000000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
8333333.250000000000000
|
||||
8333333.250000000000000
|
||||
1.332500071133751
|
||||
1.332500071133751
|
||||
|
||||
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.
|
|
@ -1,174 +1,565 @@
|
|||
0
|
||||
0
|
||||
1
|
||||
52
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
52
|
||||
0
|
||||
0
|
||||
0
|
||||
52
|
||||
53
|
||||
0
|
||||
0
|
||||
53
|
||||
52
|
||||
0
|
||||
0
|
||||
1
|
||||
52
|
||||
1
|
||||
0
|
||||
0
|
||||
53
|
||||
52
|
||||
52
|
||||
52
|
||||
53
|
||||
52
|
||||
53
|
||||
52
|
||||
52
|
||||
52
|
||||
52
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
3
|
||||
3
|
||||
4
|
||||
3
|
||||
4
|
||||
3
|
||||
3
|
||||
3
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
0
|
||||
0
|
||||
0
|
||||
52
|
||||
52
|
||||
0
|
||||
0
|
||||
52
|
||||
52
|
||||
3
|
||||
52
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
|
||||
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,100 +1,272 @@
|
|||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
|
||||
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.
|
|
@ -1,99 +1,267 @@
|
|||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
1
|
||||
4
|
||||
29
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
|
||||
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.
|
|
@ -1,26 +1,43 @@
|
|||
select ASCII('hello');
|
||||
select ASCII('hello world');
|
||||
select ASCII('hello world!');
|
||||
select ASCII('hello,world.你好,世界。');
|
||||
select ASCII('北京涛思数据科技有限公司');
|
||||
select ASCII('hello') + 1;
|
||||
select ASCII('hello') - 1;
|
||||
select ASCII('hello') from ts_4893.meters limit 5;
|
||||
select ASCII('hello') + 1 from ts_4893.meters limit 1;
|
||||
select ASCII('hello') + ASCII('hello') from ts_4893.meters limit 1;
|
||||
select ASCII(nch1) from ts_4893.meters order by ts limit 5;
|
||||
select ASCII(var1) from ts_4893.meters order by ts limit 5;
|
||||
select ASCII(concat(nch1,var1)) from ts_4893.meters order by ts limit 5;
|
||||
select ASCII(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5;
|
||||
select pow(ASCII(nch1), 2) from ts_4893.meters order by ts limit 5;
|
||||
select sqrt(ASCII(nch1)) from ts_4893.meters order by ts limit 5;
|
||||
select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5;
|
||||
select ascii('taos');
|
||||
select ascii('t');
|
||||
select ascii('\'');
|
||||
select ascii(name) from ts_4893.d0 order by ts limit 10;
|
||||
select ascii(name) from ts_4893.meters order by ts limit 10;
|
||||
select ascii(nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select ascii(nch1) from ts_4893.meters order by ts limit 10;
|
||||
select ascii(var1) from ts_4893.d0 order by ts limit 10;
|
||||
select ascii(var1) from ts_4893.meters order by ts limit 10;
|
||||
select ASCII('hello')
|
||||
select ASCII('hello world')
|
||||
select ASCII('hello world!')
|
||||
select ASCII('hello,world.你好,世界。')
|
||||
select ASCII('北京涛思数据科技有限公司')
|
||||
select ASCII('hello') + 1
|
||||
select ASCII('hello') - 1
|
||||
select ASCII('hello') from ts_4893.meters limit 5
|
||||
select ASCII('hello') + 1 from ts_4893.meters limit 1
|
||||
select ASCII('hello') + ASCII('hello') from ts_4893.meters limit 1
|
||||
select ASCII(nch1) from ts_4893.meters order by ts limit 5
|
||||
select ASCII(var1) from ts_4893.meters order by ts limit 5
|
||||
select ASCII(concat(nch1,var1)) from ts_4893.meters order by ts limit 5
|
||||
select ASCII(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5
|
||||
select pow(ASCII(nch1), 2) from ts_4893.meters order by ts limit 5
|
||||
select sqrt(ASCII(nch1)) from ts_4893.meters order by ts limit 5
|
||||
select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5
|
||||
select ascii('taos')
|
||||
select ascii('t')
|
||||
select ascii('\'')
|
||||
select ascii(name) from ts_4893.d0 order by ts limit 10
|
||||
select ascii(name) from ts_4893.meters order by ts limit 10
|
||||
select ascii(nch1) from ts_4893.d0 order by ts limit 10
|
||||
select ascii(nch1) from ts_4893.meters order by ts limit 10
|
||||
select ascii(var1) from ts_4893.d0 order by ts limit 10
|
||||
select ascii(var1) from ts_4893.meters order by ts limit 10
|
||||
select ascii(null)
|
||||
select ascii('0')
|
||||
select ascii(' ')
|
||||
select ascii('~')
|
||||
select ascii('中')
|
||||
select ascii('é')
|
||||
select ascii('!@#')
|
||||
select ascii('Hello')
|
||||
select ascii('123abc')
|
||||
select ascii(concat('A', 'B'))
|
||||
select ascii(char(65))
|
||||
select ascii(upper('b'))
|
||||
select ascii(trim(' A '))
|
||||
select name, ascii(name) from ts_4893.meters limit 1
|
||||
select name, ascii(substring(name, 1, 1)) from ts_4893.meters limit 1
|
||||
select nch1, ascii(nch1) from ts_4893.meters limit 1
|
||||
select var1, ascii(var1) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
select CHAR(77);
|
||||
select CHAR(77.5);
|
||||
select CHAR(100);
|
||||
select CHAR(77) from ts_4893.meters limit 5;
|
||||
select CHAR(77,78,79,80,81) from ts_4893.meters limit 5;
|
||||
select CHAR(77*256+77) from ts_4893.meters limit 5;
|
||||
select concat(CHAR(77),CHAR(78)) from ts_4893.meters limit 5;
|
||||
select cast(CHAR(49) as int);
|
||||
select CHAR(id + 77) from ts_4893.meters order by ts limit 5;;
|
||||
select CONCAT(CHAR(id + 77),CHAR(id + 77),CHAR(id + 77)) from ts_4893.meters limit 5;
|
||||
select CHAR(id+77, id+77, id+77, id+77, id+77) from ts_4893.meters limit 5;
|
||||
select char(77);
|
||||
select char(77 * 256 + 77);
|
||||
select char('123');
|
||||
select char(77, NULL, '123');
|
||||
select CHAR(77)
|
||||
select CHAR(77.5)
|
||||
select CHAR(100)
|
||||
select CHAR(77) from ts_4893.meters limit 5
|
||||
select CHAR(77,78,79,80,81) from ts_4893.meters limit 5
|
||||
select CHAR(77*256+77) from ts_4893.meters limit 5
|
||||
select concat(CHAR(77),CHAR(78)) from ts_4893.meters limit 5
|
||||
select cast(CHAR(49) as int)
|
||||
select CHAR(id + 77) from ts_4893.meters order by ts limit 5;
|
||||
select CONCAT(CHAR(id + 77),CHAR(id + 77),CHAR(id + 77)) from ts_4893.meters limit 5
|
||||
select CHAR(id+77, id+77, id+77, id+77, id+77) from ts_4893.meters limit 5
|
||||
select char(77)
|
||||
select char(77 * 256 + 77)
|
||||
select char('123')
|
||||
select char(77, NULL, '123')
|
||||
select char(null)
|
||||
select char('ustc')
|
||||
select char(65.99)
|
||||
select char(65, 66, 67)
|
||||
select char(72, 101, 108, 108, 111)
|
||||
|
|
|
@ -1,25 +1,38 @@
|
|||
select CHAR_LENGTH('hello');
|
||||
select CHAR_LENGTH('hello world');
|
||||
select CHAR_LENGTH('hello world!');
|
||||
select CHAR_LENGTH('hello,world.你好,世界。');
|
||||
select CHAR_LENGTH('北京涛思数据科技有限公司');
|
||||
select CHAR_LENGTH('hello') + 1;
|
||||
select CHAR_LENGTH('hello') - 1;
|
||||
select CHAR_LENGTH('hello') from ts_4893.meters limit 5;
|
||||
select CHAR_LENGTH('hello') + 1 from ts_4893.meters limit 1;
|
||||
select CHAR_LENGTH('hello') + CHAR_LENGTH('hello') from ts_4893.meters limit 1;
|
||||
select CHAR_LENGTH(nch1) from ts_4893.meters order by ts limit 5;
|
||||
select CHAR_LENGTH(var1) from ts_4893.meters order by ts limit 5;
|
||||
select CHAR_LENGTH(concat(nch1,var1)) from ts_4893.meters order by ts limit 5;
|
||||
select CHAR_LENGTH(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5;
|
||||
select pow(CHAR_LENGTH(nch1), 2) from ts_4893.meters order by ts limit 5;
|
||||
select sqrt(CHAR_LENGTH(nch1)) from ts_4893.meters order by ts limit 5;
|
||||
select cast(CHAR_LENGTH(nch1) as int) from ts_4893.meters order by ts limit 5;
|
||||
select char_length('taos');
|
||||
select char_length('涛思');
|
||||
select char_length('涛思taos');
|
||||
select char_length('tao\'s');
|
||||
select char_length(nch1) from ts_4893.d0 limit 10;
|
||||
select char_length(nch1) from ts_4893.meters limit 10;
|
||||
select char_length(var1) from ts_4893.d0 limit 10;
|
||||
select char_length(var1) from ts_4893.meters limit 10;
|
||||
select CHAR_LENGTH('hello')
|
||||
select CHAR_LENGTH('hello world')
|
||||
select CHAR_LENGTH('hello world!')
|
||||
select CHAR_LENGTH('hello,world.你好,世界。')
|
||||
select CHAR_LENGTH('北京涛思数据科技有限公司')
|
||||
select CHAR_LENGTH('hello') + 1
|
||||
select CHAR_LENGTH('hello') - 1
|
||||
select CHAR_LENGTH('hello') from ts_4893.meters limit 5
|
||||
select CHAR_LENGTH('hello') + 1 from ts_4893.meters limit 1
|
||||
select CHAR_LENGTH('hello') + CHAR_LENGTH('hello') from ts_4893.meters limit 1
|
||||
select CHAR_LENGTH(nch1) from ts_4893.meters order by ts limit 5
|
||||
select CHAR_LENGTH(var1) from ts_4893.meters order by ts limit 5
|
||||
select CHAR_LENGTH(concat(nch1,var1)) from ts_4893.meters order by ts limit 5
|
||||
select CHAR_LENGTH(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5
|
||||
select pow(CHAR_LENGTH(nch1), 2) from ts_4893.meters order by ts limit 5
|
||||
select sqrt(CHAR_LENGTH(nch1)) from ts_4893.meters order by ts limit 5
|
||||
select cast(CHAR_LENGTH(nch1) as int) from ts_4893.meters order by ts limit 5
|
||||
select char_length('taos')
|
||||
select char_length('涛思')
|
||||
select char_length('涛思taos')
|
||||
select char_length('tao\'s')
|
||||
select char_length(nch1) from ts_4893.d0 limit 10
|
||||
select char_length(nch1) from ts_4893.meters limit 10
|
||||
select char_length(var1) from ts_4893.d0 limit 10
|
||||
select char_length(var1) from ts_4893.meters limit 10
|
||||
select char_length(null)
|
||||
select char_length('')
|
||||
select char_length('あいうえお')
|
||||
select min(char_length(name)) from ts_4893.meters
|
||||
select max(char_length(name)) from ts_4893.meters
|
||||
select trim(name), char_length(trim(name)) from ts_4893.meters limit 1
|
||||
select upper(name), char_length(upper(name)) from ts_4893.meters limit 1
|
||||
select concat(name, ' - ', location), char_length(concat(name, ' - ', location)) from ts_4893.meters limit 1
|
||||
select substring(name, 1, 5), char_length(substring(name, 1, 5)) from ts_4893.meters limit 1
|
||||
select name, char_length(name) from ts_4893.meters limit 1
|
||||
select nch1, char_length(nch1) from ts_4893.meters limit 1
|
||||
select groupid, max(char_length(name)) from ts_4893.meters group by groupid order by ts
|
||||
select location, avg(char_length(name)) from ts_4893.meters group by location order by location
|
||||
|
|
|
@ -1,18 +1,36 @@
|
|||
select DAYOFWEEK('2020-01-01 00:00:00');
|
||||
select DAYOFWEEK('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK('2021-01-01 00:00:00');
|
||||
select DAYOFWEEK('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK('1998-01-01 00:00:00');
|
||||
select DAYOFWEEK('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK('1998-12-31 00:00:00');
|
||||
select DAYOFWEEK('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK('2000-01-06 00:00:00');
|
||||
select DAYOFWEEK('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK(1725095657);
|
||||
select DAYOFWEEK(1725095657) from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK(ts) from ts_4893.meters order by ts limit 10;
|
||||
select dayofweek('2020-01-01');
|
||||
select dayofweek(1721020666);
|
||||
select dayofweek(1721020666229);
|
||||
select dayofweek(ts) from ts_4893.d0 order by ts limit 10;
|
||||
select dayofweek(ts) from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK('2020-01-01 00:00:00')
|
||||
select DAYOFWEEK('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select DAYOFWEEK('2021-01-01 00:00:00')
|
||||
select DAYOFWEEK('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select DAYOFWEEK('1998-01-01 00:00:00')
|
||||
select DAYOFWEEK('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select DAYOFWEEK('1998-12-31 00:00:00')
|
||||
select DAYOFWEEK('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select DAYOFWEEK('2000-01-06 00:00:00')
|
||||
select DAYOFWEEK('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select DAYOFWEEK(1725095657)
|
||||
select DAYOFWEEK(1725095657) from ts_4893.meters order by ts limit 10
|
||||
select DAYOFWEEK(ts) from ts_4893.meters order by ts limit 10
|
||||
select dayofweek(null)
|
||||
select dayofweek('1721020591')
|
||||
select dayofweek('1721020666229')
|
||||
select dayofweek('abc')
|
||||
select dayofweek('01/01/2020')
|
||||
select dayofweek('20200101')
|
||||
select dayofweek('20/01/01')
|
||||
select dayofweek('11/01/31')
|
||||
select dayofweek('01-JAN-20')
|
||||
select dayofweek('2020-01-01')
|
||||
select dayofweek(1721020666)
|
||||
select dayofweek(1721020666229)
|
||||
select dayofweek(ts) from ts_4893.d0 order by ts limit 10
|
||||
select dayofweek(ts) from ts_4893.meters order by ts limit 10
|
||||
select dayofweek('2024-02-29')
|
||||
select dayofweek('2024-01-01')
|
||||
select dayofweek('2024-12-31')
|
||||
select dayofweek('9999-12-31')
|
||||
select dayofweek(ts) from ts_4893.meters limit 1
|
||||
select dayofweek(name) from ts_4893.meters limit 1
|
||||
select dayofweek(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
|
||||
select id, dayofweek(ts) from ts_4893.meters where id = 1 limit 1
|
||||
select groupid, sum(dayofweek(ts)) from ts_4893.meters group by groupid order by groupid
|
||||
|
|
|
@ -1,32 +1,47 @@
|
|||
select DEGREES(0);
|
||||
select DEGREES(1);
|
||||
select DEGREES(1.5);
|
||||
select DEGREES(100);
|
||||
select DEGREES(-1);
|
||||
select DEGREES(-1.5);
|
||||
select DEGREES(-100);
|
||||
select DEGREES(1) + 1;
|
||||
select DEGREES(1) - 1;
|
||||
select DEGREES(1) * 1;
|
||||
select DEGREES(1) / 1;
|
||||
select DEGREES(1) from ts_4893.meters limit 5;
|
||||
select DEGREES(1) + 1 from ts_4893.meters limit 1;
|
||||
select DEGREES(1) - 1 from ts_4893.meters limit 1;
|
||||
select DEGREES(1) * 2 from ts_4893.meters limit 1;
|
||||
select DEGREES(1) / 2 from ts_4893.meters limit 1;
|
||||
select DEGREES(2) + DEGREES(1) from ts_4893.meters limit 1;
|
||||
select DEGREES(2) - DEGREES(1) from ts_4893.meters limit 1;
|
||||
select DEGREES(2) * DEGREES(1) from ts_4893.meters limit 1;
|
||||
select DEGREES(2) / DEGREES(1) from ts_4893.meters limit 1;
|
||||
select DEGREES(1) + id from ts_4893.meters order by ts limit 5;
|
||||
select DEGREES(id) + id from ts_4893.meters order by ts limit 5;
|
||||
select DEGREES(abs(10));
|
||||
select DEGREES(PI());
|
||||
select abs(DEGREES(10));
|
||||
select pow(DEGREES(10), 2);
|
||||
select sqrt(DEGREES(10));
|
||||
select cast(DEGREES(10) as int);
|
||||
select DEGREES(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select degrees(pi());
|
||||
select degrees(current) from ts_4893.d0 order by ts limit 10;
|
||||
select degrees(current) from ts_4893.meters order by ts limit 10;
|
||||
select DEGREES(0)
|
||||
select DEGREES(1)
|
||||
select DEGREES(1.5)
|
||||
select DEGREES(100)
|
||||
select DEGREES(-1)
|
||||
select DEGREES(-1.5)
|
||||
select DEGREES(-100)
|
||||
select DEGREES(1) + 1
|
||||
select DEGREES(1) - 1
|
||||
select DEGREES(1) * 1
|
||||
select DEGREES(1) / 1
|
||||
select DEGREES(1) from ts_4893.meters limit 5
|
||||
select DEGREES(1) + 1 from ts_4893.meters limit 1
|
||||
select DEGREES(1) - 1 from ts_4893.meters limit 1
|
||||
select DEGREES(1) * 2 from ts_4893.meters limit 1
|
||||
select DEGREES(1) / 2 from ts_4893.meters limit 1
|
||||
select DEGREES(2) + DEGREES(1) from ts_4893.meters limit 1
|
||||
select DEGREES(2) - DEGREES(1) from ts_4893.meters limit 1
|
||||
select DEGREES(2) * DEGREES(1) from ts_4893.meters limit 1
|
||||
select DEGREES(2) / DEGREES(1) from ts_4893.meters limit 1
|
||||
select DEGREES(1) + id from ts_4893.meters order by ts limit 5
|
||||
select DEGREES(id) + id from ts_4893.meters order by ts limit 5
|
||||
select DEGREES(abs(10))
|
||||
select DEGREES(PI())
|
||||
select abs(DEGREES(10))
|
||||
select pow(DEGREES(10), 2)
|
||||
select sqrt(DEGREES(10))
|
||||
select cast(DEGREES(10) as int)
|
||||
select DEGREES(sqrt(id)) from ts_4893.meters order by ts limit 5
|
||||
select degrees(pi())
|
||||
select degrees(current) from ts_4893.d0 order by ts limit 10
|
||||
select degrees(current) from ts_4893.meters order by ts limit 10
|
||||
select degrees(null)
|
||||
select degrees(-5)
|
||||
select degrees(3.14)
|
||||
select degrees(2*pi())
|
||||
select degrees(pi()/2)
|
||||
select degrees(-pi()/2)
|
||||
select degrees(1000000)
|
||||
select degrees(sin(1))
|
||||
select degrees(cos(1))
|
||||
select degrees(tan(1))
|
||||
select degrees(radians(90))
|
||||
select degrees(atan(1))
|
||||
select degrees(phase) from ts_4893.meters limit 1
|
||||
select degrees(current) from ts_4893.meters limit 1
|
||||
select degrees(voltage) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,32 +1,45 @@
|
|||
select EXP(0);
|
||||
select EXP(1);
|
||||
select EXP(1.5);
|
||||
select EXP(100);
|
||||
select EXP(-1);
|
||||
select EXP(-1.5);
|
||||
select EXP(-100);
|
||||
select EXP(1) + 1;
|
||||
select EXP(1) - 1;
|
||||
select EXP(1) * 1;
|
||||
select EXP(1) / 1;
|
||||
select exp(1) from ts_4893.meters limit 5;
|
||||
select exp(1) + 1 from ts_4893.meters limit 1;
|
||||
select exp(1) - 1 from ts_4893.meters limit 1;
|
||||
select exp(1) * 2 from ts_4893.meters limit 1;
|
||||
select exp(1) / 2 from ts_4893.meters limit 1;
|
||||
select exp(2) + exp(1) from ts_4893.meters limit 1;
|
||||
select exp(2) - exp(1) from ts_4893.meters limit 1;
|
||||
select exp(2) * exp(1) from ts_4893.meters limit 1;
|
||||
select exp(2) / exp(1) from ts_4893.meters limit 1;
|
||||
select exp(1) + id from ts_4893.meters order by ts limit 5;
|
||||
select exp(id) + id from ts_4893.meters order by ts limit 5;
|
||||
select abs(EXP(10));
|
||||
select pow(EXP(10), 2);
|
||||
select sqrt(EXP(10));
|
||||
select cast(EXP(10) as int);
|
||||
select EXP(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select EXP(EXP(EXP(EXP(0))));
|
||||
select exp(2);
|
||||
select exp(0.5);
|
||||
select exp(current) from ts_4893.d0 order by ts limit 10;
|
||||
select exp(current) from ts_4893.meters order by ts limit 10;
|
||||
select EXP(0)
|
||||
select EXP(1)
|
||||
select EXP(1.5)
|
||||
select EXP(100)
|
||||
select EXP(-1)
|
||||
select EXP(-1.5)
|
||||
select EXP(-100)
|
||||
select EXP(1) + 1
|
||||
select EXP(1) - 1
|
||||
select EXP(1) * 1
|
||||
select EXP(1) / 1
|
||||
select exp(1) from ts_4893.meters limit 5
|
||||
select exp(1) + 1 from ts_4893.meters limit 1
|
||||
select exp(1) - 1 from ts_4893.meters limit 1
|
||||
select exp(1) * 2 from ts_4893.meters limit 1
|
||||
select exp(1) / 2 from ts_4893.meters limit 1
|
||||
select exp(2) + exp(1) from ts_4893.meters limit 1
|
||||
select exp(2) - exp(1) from ts_4893.meters limit 1
|
||||
select exp(2) * exp(1) from ts_4893.meters limit 1
|
||||
select exp(2) / exp(1) from ts_4893.meters limit 1
|
||||
select exp(1) + id from ts_4893.meters order by ts limit 5
|
||||
select exp(id) + id from ts_4893.meters order by ts limit 5
|
||||
select abs(EXP(10))
|
||||
select pow(EXP(10), 2)
|
||||
select sqrt(EXP(10))
|
||||
select cast(EXP(10) as int)
|
||||
select EXP(sqrt(id)) from ts_4893.meters order by ts limit 5
|
||||
select EXP(EXP(EXP(EXP(0))))
|
||||
select exp(2)
|
||||
select exp(0.5)
|
||||
select exp(current) from ts_4893.d0 order by ts limit 10
|
||||
select exp(current) from ts_4893.meters order by ts limit 10
|
||||
select exp(null)
|
||||
select exp(100000)
|
||||
select exp(-1000)
|
||||
select exp(-9999999999)
|
||||
select exp(0.0001)
|
||||
select exp(pi())
|
||||
select exp(voltage) from ts_4893.meters limit 1
|
||||
select exp(current) from ts_4893.meters limit 1
|
||||
select exp(phase) from ts_4893.meters limit 1
|
||||
select exp(voltage + current) from ts_4893.meters limit 1
|
||||
select exp(abs(current)) from ts_4893.meters limit 1
|
||||
select exp(log(voltage)) from ts_4893.meters limit 1
|
||||
select round(exp(voltage), 2) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,29 +1,46 @@
|
|||
select LN(100);
|
||||
select LN(1.5);
|
||||
select LN(100);
|
||||
select LN(100) + 1;
|
||||
select LN(100) - 1;
|
||||
select LN(100) * 1;
|
||||
select LN(100) / 1;
|
||||
select LN(100) from ts_4893.meters limit 5;
|
||||
select LN(100) + 1 from ts_4893.meters limit 1;
|
||||
select LN(100) - 1 from ts_4893.meters limit 1;
|
||||
select LN(100) * 2 from ts_4893.meters limit 1;
|
||||
select LN(100) / 2 from ts_4893.meters limit 1;
|
||||
select LN(2) + LN(100) from ts_4893.meters limit 1;
|
||||
select LN(2) - LN(100) from ts_4893.meters limit 1;
|
||||
select LN(2) * LN(100) from ts_4893.meters limit 1;
|
||||
select LN(2) / LN(100) from ts_4893.meters limit 1;
|
||||
select LN(100) + id from ts_4893.meters order by ts limit 5;
|
||||
select LN(id + 1) + id from ts_4893.meters order by ts limit 5;
|
||||
select abs(LN(10));
|
||||
select pow(LN(10), 2);
|
||||
select sqrt(LN(10));
|
||||
select cast(LN(10) as int);
|
||||
select LN(sqrt(id) + 1) from ts_4893.meters order by ts limit 5;
|
||||
select LN(LN(LN(LN(10000))));
|
||||
select LN(EXP(2));
|
||||
select ln(10);
|
||||
select ln(pi());
|
||||
select ln(current) from ts_4893.d0 order by ts limit 10;
|
||||
select ln(current) from ts_4893.meters order by ts limit 10;
|
||||
select LN(100)
|
||||
select LN(1.5)
|
||||
select LN(100)
|
||||
select LN(100) + 1
|
||||
select LN(100) - 1
|
||||
select LN(100) * 1
|
||||
select LN(100) / 1
|
||||
select LN(100) from ts_4893.meters limit 5
|
||||
select LN(100) + 1 from ts_4893.meters limit 1
|
||||
select LN(100) - 1 from ts_4893.meters limit 1
|
||||
select LN(100) * 2 from ts_4893.meters limit 1
|
||||
select LN(100) / 2 from ts_4893.meters limit 1
|
||||
select LN(2) + LN(100) from ts_4893.meters limit 1
|
||||
select LN(2) - LN(100) from ts_4893.meters limit 1
|
||||
select LN(2) * LN(100) from ts_4893.meters limit 1
|
||||
select LN(2) / LN(100) from ts_4893.meters limit 1
|
||||
select LN(100) + id from ts_4893.meters order by ts limit 5
|
||||
select LN(id + 1) + id from ts_4893.meters order by ts limit 5
|
||||
select ln(null)
|
||||
select ln(0)
|
||||
select ln(-5)
|
||||
select abs(LN(10))
|
||||
select pow(LN(10), 2)
|
||||
select sqrt(LN(10))
|
||||
select cast(LN(10) as int)
|
||||
select LN(sqrt(id) + 1) from ts_4893.meters order by ts limit 5
|
||||
select LN(LN(LN(LN(10000))))
|
||||
select LN(EXP(2))
|
||||
select ln(10)
|
||||
select ln(pi())
|
||||
select ln(current) from ts_4893.d0 order by ts limit 10
|
||||
select ln(current) from ts_4893.meters order by ts limit 10
|
||||
select ln(1)
|
||||
select ln(20)
|
||||
select ln(100)
|
||||
select ln(99999999999999)
|
||||
select ln(0.1)
|
||||
select ln(2.718)
|
||||
select ln(exp(1))
|
||||
select ln(voltage) from ts_4893.meters where voltage > 0 limit 1
|
||||
select ln(current) from ts_4893.meters where current > 0 limit 1
|
||||
select ln(phase) from ts_4893.meters where phase > 0 limit 1
|
||||
select ln(exp(voltage)) from ts_4893.meters where voltage > 0 limit 1
|
||||
select ln(abs(current)) from ts_4893.meters where current != 0 limit 1
|
||||
select ln(sqrt(phase)) from ts_4893.meters where phase >= 0 limit 1
|
||||
select ln(log(current)) from ts_4893.meters where current > 1 limit 1
|
||||
|
|
|
@ -1,16 +1,28 @@
|
|||
select MAX(id) from ts_4893.meters;
|
||||
select MAX(current) from ts_4893.meters;
|
||||
select MAX(voltage) from ts_4893.meters;
|
||||
select MAX(name) from ts_4893.meters;
|
||||
select MAX(nch1) from ts_4893.meters;
|
||||
select MAX(nch2) from ts_4893.meters;
|
||||
select MAX(var1) from ts_4893.meters;
|
||||
select MAX(var2) from ts_4893.meters;
|
||||
select MAX(id) from ts_4893.meters interval(60d);
|
||||
select MAX(current) from ts_4893.meters interval(60d);
|
||||
select MAX(voltage) from ts_4893.meters interval(60d);
|
||||
select MAX(name) from ts_4893.meters interval(60d);
|
||||
select MAX(nch1) from ts_4893.meters interval(60d);
|
||||
select MAX(nch2) from ts_4893.meters interval(60d);
|
||||
select MAX(var1) from ts_4893.meters interval(60d);
|
||||
select MAX(var2) from ts_4893.meters interval(60d);
|
||||
select MAX(current) from ts_4893.meters
|
||||
select MAX(voltage) from ts_4893.meters
|
||||
select MAX(name) from ts_4893.meters
|
||||
select MAX(nch1) from ts_4893.meters
|
||||
select MAX(nch2) from ts_4893.meters
|
||||
select MAX(var1) from ts_4893.meters
|
||||
select MAX(var2) from ts_4893.meters
|
||||
select MAX(id) from ts_4893.meters interval(60d)
|
||||
select MAX(current) from ts_4893.meters interval(60d)
|
||||
select MAX(voltage) from ts_4893.meters interval(60d)
|
||||
select MAX(name) from ts_4893.meters interval(60d)
|
||||
select MAX(nch1) from ts_4893.meters interval(60d)
|
||||
select MAX(nch2) from ts_4893.meters interval(60d)
|
||||
select MAX(var1) from ts_4893.meters interval(60d)
|
||||
select MAX(var2) from ts_4893.meters interval(60d)
|
||||
select max(null) from ts_4893.meters
|
||||
select max(id) from ts_4893.meters
|
||||
select max(id) from ts_4893.meters where id > 0
|
||||
select max(id) from ts_4893.meters where id <= 0
|
||||
select max(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
|
||||
select max(voltage) from ts_4893.meters where voltage is not null
|
||||
select max(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
|
||||
select round(max(current), 2) from ts_4893.meters
|
||||
select pow(max(current), 2) from ts_4893.meters
|
||||
select log(max(voltage) + 1) from ts_4893.meters
|
||||
select groupid, max(voltage) from ts_4893.meters group by groupid order by groupid
|
||||
select location, max(id) from ts_4893.meters group by location order by location
|
||||
select location, max(current) from ts_4893.meters group by location order by location
|
||||
|
|
|
@ -1,16 +1,28 @@
|
|||
select MIN(id) from ts_4893.meters;
|
||||
select MIN(current) from ts_4893.meters;
|
||||
select MIN(voltage) from ts_4893.meters;
|
||||
select MIN(name) from ts_4893.meters;
|
||||
select MIN(nch1) from ts_4893.meters;
|
||||
select MIN(nch2) from ts_4893.meters;
|
||||
select MIN(var1) from ts_4893.meters;
|
||||
select MIN(var2) from ts_4893.meters;
|
||||
select MIN(id) from ts_4893.meters interval(60d);
|
||||
select MIN(current) from ts_4893.meters interval(60d);
|
||||
select MIN(voltage) from ts_4893.meters interval(60d);
|
||||
select MIN(name) from ts_4893.meters interval(60d);
|
||||
select MIN(nch1) from ts_4893.meters interval(60d);
|
||||
select MIN(nch2) from ts_4893.meters interval(60d);
|
||||
select MIN(var1) from ts_4893.meters interval(60d);
|
||||
select MIN(var2) from ts_4893.meters interval(60d);
|
||||
select MIN(id) from ts_4893.meters
|
||||
select MIN(current) from ts_4893.meters
|
||||
select MIN(voltage) from ts_4893.meters
|
||||
select MIN(name) from ts_4893.meters
|
||||
select MIN(nch1) from ts_4893.meters
|
||||
select MIN(nch2) from ts_4893.meters
|
||||
select MIN(var1) from ts_4893.meters
|
||||
select MIN(var2) from ts_4893.meters
|
||||
select MIN(id) from ts_4893.meters interval(60d)
|
||||
select MIN(current) from ts_4893.meters interval(60d)
|
||||
select MIN(voltage) from ts_4893.meters interval(60d)
|
||||
select MIN(name) from ts_4893.meters interval(60d)
|
||||
select MIN(nch1) from ts_4893.meters interval(60d)
|
||||
select MIN(nch2) from ts_4893.meters interval(60d)
|
||||
select MIN(var1) from ts_4893.meters interval(60d)
|
||||
select MIN(var2) from ts_4893.meters interval(60d)
|
||||
select min(null) from ts_4893.meters
|
||||
select min(id) from ts_4893.meters where id > 0
|
||||
select min(id) from ts_4893.meters where id <= 0
|
||||
select min(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
|
||||
select min(voltage) from ts_4893.meters where voltage is not null
|
||||
select min(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
|
||||
select round(min(current), 2) from ts_4893.meters
|
||||
select pow(min(current), 2) from ts_4893.meters
|
||||
select log(min(voltage) + 1) from ts_4893.meters
|
||||
select groupid, min(voltage) from ts_4893.meters group by groupid order by groupid
|
||||
select location, min(current) from ts_4893.meters group by location order by location
|
||||
select location, min(id) from ts_4893.meters group by location order by location
|
||||
|
|
|
@ -1,18 +1,36 @@
|
|||
select MOD(10.55, 3);
|
||||
select MOD(10.55, 2);
|
||||
select MOD(10.55, 1);
|
||||
select MOD(10.55, -1);
|
||||
select MOD(10.55, -10);
|
||||
select MOD(-10.55, 1);
|
||||
select MOD(99, 1);
|
||||
select MOD(10.55, 1) + 1;
|
||||
select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123.123456789, 9), 8), 7), 6), 5), 4), 3);
|
||||
select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123456789.123456789, -1), -2), -3), -4), -5), -6), -7);
|
||||
select MOD(87654321.123456789, id + 1) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(current, id + 1) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(current, 1) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10;
|
||||
select mod(10, -3);
|
||||
select mod(10, 3);
|
||||
select mod(id, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select mod(id, 3) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(10.55, 3)
|
||||
select MOD(10.55, 2)
|
||||
select MOD(10.55, 1)
|
||||
select MOD(10.55, -1)
|
||||
select MOD(10.55, -10)
|
||||
select MOD(-10.55, 1)
|
||||
select MOD(99, 1)
|
||||
select MOD(10.55, 1) + 1
|
||||
select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123.123456789, 9), 8), 7), 6), 5), 4), 3)
|
||||
select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
|
||||
select MOD(87654321.123456789, id + 1) from ts_4893.meters order by ts limit 10
|
||||
select MOD(current, id + 1) from ts_4893.meters order by ts limit 10
|
||||
select MOD(current, 1) from ts_4893.meters order by ts limit 10
|
||||
select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10
|
||||
select mod(10, -3)
|
||||
select mod(10, 3)
|
||||
select mod(id, 3) from ts_4893.d0 order by ts limit 10
|
||||
select mod(id, 3) from ts_4893.meters order by ts limit 10
|
||||
select mod(null, 2)
|
||||
select mod(10, null)
|
||||
select mod(10, 0)
|
||||
select mod(-10, 0)
|
||||
select mod(5, 0)
|
||||
select mod(0, 1)
|
||||
select mod(1, 1)
|
||||
select mod(5, 2)
|
||||
select mod(5, -3)
|
||||
select mod(15, 4)
|
||||
select mod(-5, 3)
|
||||
select mod(voltage, 2) from ts_4893.meters limit 1
|
||||
select mod(current, 10) from ts_4893.meters limit 1
|
||||
select mod(current, log(100)) from ts_4893.meters limit 1
|
||||
select mod(phase, 4) from ts_4893.meters limit 1
|
||||
select mod(abs(voltage), 3) from ts_4893.meters limit 1
|
||||
select mod(phase, sqrt(16)) from ts_4893.meters limit 1
|
||||
select mod(round(voltage), 5) from ts_4893.meters limit 1
|
||||
|
|
|
@ -19,3 +19,19 @@ select sqrt(pi())
|
|||
select cast(pi() as int)
|
||||
select pi()
|
||||
select substring_index(null, '.', 2)
|
||||
select pi() + null
|
||||
select pi() * 0
|
||||
select pi() / 0
|
||||
select pi() * 0.5
|
||||
select pi() * -1
|
||||
select pi() * name from ts_4893.meters limit 1
|
||||
select pi() * voltage from ts_4893.meters limit 1
|
||||
select pi() * phase * 2 from ts_4893.meters limit 1
|
||||
select round(pi(), 6)
|
||||
select round(pi() * phase, 2) from ts_4893.meters limit 1
|
||||
select sqrt(pi() * voltage) from ts_4893.meters limit 1
|
||||
select sqrt(current / pi()) from ts_4893.meters limit 1
|
||||
select abs(pi() * phase) from ts_4893.meters limit 1
|
||||
select log(pi() * voltage) from ts_4893.meters limit 1
|
||||
select voltage / pi() from ts_4893.meters limit 1
|
||||
select id, case when voltage > 100 then pi() else pi() / 2 end from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,40 +1,62 @@
|
|||
select POSITION('北' IN '北京涛思');
|
||||
select POSITION('涛思' IN '北京涛思');
|
||||
select POSITION('a' IN 'abcd');
|
||||
select POSITION('e' IN 'abcd');
|
||||
select POSITION('好,' IN 'hello,world.你好,世界。');
|
||||
select POSITION(',你' IN 'hello,world.你好,世界。');
|
||||
select POSITION('world' IN 'hello,world.你好,世界。');
|
||||
select POSITION('aaa' IN 'aaaaaaaaa');
|
||||
select POSITION(CONCAT('a','b','c') IN CONCAT('abc','def','ghi'));
|
||||
select POSITION(CONCAT('a','b','d') IN CONCAT('abc','def','ghi'));
|
||||
select POSITION(nch2 IN nch1) from ts_4893.meters where POSITION(nch2 IN nch1) != 0 order by ts limit 5;
|
||||
select POSITION(nch2 IN nch1) from ts_4893.meters order by ts limit 5;
|
||||
select POSITION(var2 IN var1) from ts_4893.meters where POSITION(var2 IN var1) != 0 order by ts limit 5;
|
||||
select POSITION(var2 IN var1) from ts_4893.meters order by ts limit 5;
|
||||
select POSITION(var2 IN nch1) from ts_4893.meters where POSITION(var2 IN nch1) != 0 order by ts limit 5;
|
||||
select POSITION(var2 IN nch1) from ts_4893.meters order by ts limit 5;
|
||||
select POSITION(nch2 IN var1) from ts_4893.meters where POSITION(nch2 IN var1) != 0 order by ts limit 5;
|
||||
select POSITION(nch2 IN var1) from ts_4893.meters order by ts limit 5;
|
||||
select POSITION('a' IN nch1) from ts_4893.meters where POSITION('a' IN nch1) != 0 order by ts limit 5;
|
||||
select POSITION('a' IN var1) from ts_4893.meters where POSITION('a' IN var1) != 0 order by ts limit 5;
|
||||
select POSITION('一' IN nch1) from ts_4893.meters where POSITION('一' IN nch1) != 0 order by ts limit 5;
|
||||
select POSITION('一' IN var1) from ts_4893.meters where POSITION('一' IN var1) != 0 order by ts limit 5;
|
||||
select POSITION(nch2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(nch2 IN 'abcdefghijklmn') != 0 order by ts limit 5;
|
||||
select POSITION(var2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(var2 IN 'abcdefghijklmn') != 0 order by ts limit 5;
|
||||
select POSITION(nch2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(nch2 IN '一二三四五六七八九十') != 0 order by ts limit 5;
|
||||
select POSITION(var2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(var2 IN '一二三四五六七八九十') != 0 order by ts limit 5;
|
||||
select ABS(POSITION('aaa' IN 'aaaaaaaaa'));
|
||||
select POW(POSITION('aaa' IN 'aaaaaaaaa'), 2);
|
||||
select position('t' in 'taos');
|
||||
select position('ustc' in 'taos');
|
||||
select position('' in '');
|
||||
select position('' in 'taos');
|
||||
select position(nch2 in nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(nch2 in nch1) from ts_4893.meters order by ts limit 10;
|
||||
select position(nch2 in var1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(nch2 in var1) from ts_4893.meters order by ts limit 10;
|
||||
select position(var2 in nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(var2 in nch1) from ts_4893.meters order by ts limit 10;
|
||||
select position(var2 in var1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(var2 in var1) from ts_4893.meters order by ts limit 10;
|
||||
select POSITION('北' IN '北京涛思')
|
||||
select POSITION('涛思' IN '北京涛思')
|
||||
select POSITION('a' IN 'abcd')
|
||||
select POSITION('e' IN 'abcd')
|
||||
select POSITION('好,' IN 'hello,world.你好,世界。')
|
||||
select POSITION(',你' IN 'hello,world.你好,世界。')
|
||||
select POSITION('world' IN 'hello,world.你好,世界。')
|
||||
select POSITION('aaa' IN 'aaaaaaaaa')
|
||||
select POSITION(CONCAT('a','b','c') IN CONCAT('abc','def','ghi'))
|
||||
select POSITION(CONCAT('a','b','d') IN CONCAT('abc','def','ghi'))
|
||||
select POSITION(nch2 IN nch1) from ts_4893.meters where POSITION(nch2 IN nch1) != 0 order by ts limit 5
|
||||
select POSITION(nch2 IN nch1) from ts_4893.meters order by ts limit 5
|
||||
select POSITION(var2 IN var1) from ts_4893.meters where POSITION(var2 IN var1) != 0 order by ts limit 5
|
||||
select POSITION(var2 IN var1) from ts_4893.meters order by ts limit 5
|
||||
select POSITION(var2 IN nch1) from ts_4893.meters where POSITION(var2 IN nch1) != 0 order by ts limit 5
|
||||
select POSITION(var2 IN nch1) from ts_4893.meters order by ts limit 5
|
||||
select POSITION(nch2 IN var1) from ts_4893.meters where POSITION(nch2 IN var1) != 0 order by ts limit 5
|
||||
select POSITION(nch2 IN var1) from ts_4893.meters order by ts limit 5
|
||||
select POSITION('a' IN nch1) from ts_4893.meters where POSITION('a' IN nch1) != 0 order by ts limit 5
|
||||
select POSITION('a' IN var1) from ts_4893.meters where POSITION('a' IN var1) != 0 order by ts limit 5
|
||||
select POSITION('一' IN nch1) from ts_4893.meters where POSITION('一' IN nch1) != 0 order by ts limit 5
|
||||
select POSITION('一' IN var1) from ts_4893.meters where POSITION('一' IN var1) != 0 order by ts limit 5
|
||||
select POSITION(nch2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(nch2 IN 'abcdefghijklmn') != 0 order by ts limit 5
|
||||
select POSITION(var2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(var2 IN 'abcdefghijklmn') != 0 order by ts limit 5
|
||||
select POSITION(nch2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(nch2 IN '一二三四五六七八九十') != 0 order by ts limit 5
|
||||
select POSITION(var2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(var2 IN '一二三四五六七八九十') != 0 order by ts limit 5
|
||||
select ABS(POSITION('aaa' IN 'aaaaaaaaa'))
|
||||
select POW(POSITION('aaa' IN 'aaaaaaaaa'), 2)
|
||||
select position('t' in 'taos')
|
||||
select position('ustc' in 'taos')
|
||||
select position('' in '')
|
||||
select position('' in 'taos')
|
||||
select position(nch2 in nch1) from ts_4893.d0 order by ts limit 10
|
||||
select position(nch2 in nch1) from ts_4893.meters order by ts limit 10
|
||||
select position(nch2 in var1) from ts_4893.d0 order by ts limit 10
|
||||
select position(nch2 in var1) from ts_4893.meters order by ts limit 10
|
||||
select position(var2 in nch1) from ts_4893.d0 order by ts limit 10
|
||||
select position(var2 in nch1) from ts_4893.meters order by ts limit 10
|
||||
select position(var2 in var1) from ts_4893.d0 order by ts limit 10
|
||||
select position(var2 in var1) from ts_4893.meters order by ts limit 10
|
||||
select position('t' in null)
|
||||
select position(null in 'taos')
|
||||
select position('' in 'A')
|
||||
select position('A' in 'A')
|
||||
select position('A' in '')
|
||||
select position('A' in null)
|
||||
select position('Z' in 'ABC')
|
||||
select position('l' in 'Hello')
|
||||
select position('s' in 'meters')
|
||||
select position('中' in '中国')
|
||||
select position('e' in 'é')
|
||||
select position('W' in 'Hello World')
|
||||
select position('@' in '!@#')
|
||||
select position('6' in '12345')
|
||||
select position('A' in trim(' A '))
|
||||
select position('A' in upper('abc'))
|
||||
select position('B' in concat('A', 'B'))
|
||||
select position('x' in replace('Hello', 'l', 'x'))
|
||||
select name, position('e' in name) from ts_4893.meters limit 1
|
||||
select name, position('a' in substring(name, 2, 5)) from ts_4893.meters limit 1
|
||||
select nch1, position('n' in nch1) from ts_4893.meters limit 1
|
||||
select var1, position('1' in var1) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,32 +1,48 @@
|
|||
select RADIANS(0);
|
||||
select RADIANS(1);
|
||||
select RADIANS(1.5);
|
||||
select RADIANS(100);
|
||||
select RADIANS(-1);
|
||||
select RADIANS(-1.5);
|
||||
select RADIANS(-100);
|
||||
select RADIANS(1) + 1;
|
||||
select RADIANS(1) - 1;
|
||||
select RADIANS(1) * 1;
|
||||
select RADIANS(1) / 1;
|
||||
select RADIANS(1) from ts_4893.meters limit 5;
|
||||
select RADIANS(1) + 1 from ts_4893.meters limit 1;
|
||||
select RADIANS(1) - 1 from ts_4893.meters limit 1;
|
||||
select RADIANS(1) * 2 from ts_4893.meters limit 1;
|
||||
select RADIANS(1) / 2 from ts_4893.meters limit 1;
|
||||
select RADIANS(2) + RADIANS(1) from ts_4893.meters limit 1;
|
||||
select RADIANS(2) - RADIANS(1) from ts_4893.meters limit 1;
|
||||
select RADIANS(2) * RADIANS(1) from ts_4893.meters limit 1;
|
||||
select RADIANS(2) / RADIANS(1) from ts_4893.meters limit 1;
|
||||
select RADIANS(1) + id from ts_4893.meters order by ts limit 5;
|
||||
select RADIANS(id) + id from ts_4893.meters order by ts limit 5;
|
||||
select RADIANS(abs(10));
|
||||
select RADIANS(DEGREES(PI()));
|
||||
select abs(RADIANS(10));
|
||||
select pow(RADIANS(10), 2);
|
||||
select sqrt(RADIANS(10));
|
||||
select cast(RADIANS(10) as int);
|
||||
select RADIANS(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select radians(180);
|
||||
select radians(current) from ts_4893.d0 order by ts limit 10;
|
||||
select radians(current) from ts_4893.meters order by ts limit 10;
|
||||
select RADIANS(0)
|
||||
select RADIANS(1)
|
||||
select RADIANS(1.5)
|
||||
select RADIANS(100)
|
||||
select RADIANS(-1)
|
||||
select RADIANS(-1.5)
|
||||
select RADIANS(-100)
|
||||
select RADIANS(1) + 1
|
||||
select RADIANS(1) - 1
|
||||
select RADIANS(1) * 1
|
||||
select RADIANS(1) / 1
|
||||
select RADIANS(1) from ts_4893.meters limit 5
|
||||
select RADIANS(1) + 1 from ts_4893.meters limit 1
|
||||
select RADIANS(1) - 1 from ts_4893.meters limit 1
|
||||
select RADIANS(1) * 2 from ts_4893.meters limit 1
|
||||
select RADIANS(1) / 2 from ts_4893.meters limit 1
|
||||
select RADIANS(2) + RADIANS(1) from ts_4893.meters limit 1
|
||||
select RADIANS(2) - RADIANS(1) from ts_4893.meters limit 1
|
||||
select RADIANS(2) * RADIANS(1) from ts_4893.meters limit 1
|
||||
select RADIANS(2) / RADIANS(1) from ts_4893.meters limit 1
|
||||
select RADIANS(1) + id from ts_4893.meters order by ts limit 5
|
||||
select RADIANS(id) + id from ts_4893.meters order by ts limit 5
|
||||
select RADIANS(abs(10))
|
||||
select RADIANS(DEGREES(PI()))
|
||||
select abs(RADIANS(10))
|
||||
select pow(RADIANS(10), 2)
|
||||
select sqrt(RADIANS(10))
|
||||
select cast(RADIANS(10) as int)
|
||||
select RADIANS(sqrt(id)) from ts_4893.meters order by ts limit 5
|
||||
select radians(180)
|
||||
select radians(current) from ts_4893.d0 order by ts limit 10
|
||||
select radians(current) from ts_4893.meters order by ts limit 10
|
||||
select radians(null)
|
||||
select radians(0)
|
||||
select radians(45)
|
||||
select radians(-45)
|
||||
select radians(90)
|
||||
select radians(-90)
|
||||
select radians(360)
|
||||
select radians(1000000)
|
||||
select radians(sin(1))
|
||||
select radians(cos(1))
|
||||
select radians(tan(1))
|
||||
select radians(degrees(90))
|
||||
select radians(atan(1))
|
||||
select radians(current) from ts_4893.meters limit 1
|
||||
select radians(voltage) from ts_4893.meters limit 1
|
||||
select radians(phase) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
select RAND(1245);
|
||||
select RAND(id) from ts_4893.d0 limit 10;
|
||||
select RAND(id) from ts_4893.d0 order by id desc limit 10;
|
||||
select RAND(1245)
|
||||
select RAND(id) from ts_4893.d0 limit 10
|
||||
select RAND(id) from ts_4893.d0 order by id desc limit 10
|
||||
select rand(0)
|
||||
select rand(1)
|
||||
select rand(-1)
|
||||
select rand(12345678901234567890)
|
||||
select rand(-12345678901234567890)
|
||||
select rand(12345), rand(12345)
|
||||
select rand(9999999999) where rand(9999999999) >= 0 and rand(9999999999) < 1
|
||||
select rand(id) from ts_4893.meters limit 100
|
||||
|
|
|
@ -1,31 +1,53 @@
|
|||
select repeat('hello', 1);
|
||||
select repeat('hello', 20);
|
||||
SELECT REPEAT('a', 2);
|
||||
SELECT CONCAT('g',CONCAT(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h');
|
||||
SELECT CONCAT('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h');
|
||||
SELECT CONCAT_WS('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h');
|
||||
select length(concat(repeat("a",3200),repeat("a",3200)));
|
||||
select length(replace("aaaaa","a",concat(repeat("a",10000),repeat("a",12))));
|
||||
select repeat('北京taos', 6);
|
||||
select repeat(nch1, 6) from ts_4893.meters order by ts limit 5;
|
||||
select repeat(var1, 6) from ts_4893.meters order by ts limit 5;
|
||||
select position(nch1 in repeat(nch1,6)) from ts_4893.meters order by ts limit 5;
|
||||
select position(var1 in repeat(var1,6)) from ts_4893.meters order by ts limit 5;
|
||||
select position(nch1 in repeat(var1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5;
|
||||
select position(var1 in repeat(nch1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5;
|
||||
select repeat(nch1, id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat(var1, id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat('nch1', id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat('var1', id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat('taos', 1);
|
||||
select repeat('taos', 2);
|
||||
select repeat(name, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(name, 3) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(nch1, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(nch1, 3) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(var1, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(var1, 3) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(name, groupid) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(name, groupid) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(nch1, groupid) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(nch1, groupid) from ts_4893.meters order by ts limit 10;
|
||||
select repeat('hello', 1)
|
||||
select repeat('hello', 20)
|
||||
SELECT REPEAT('a', 2)
|
||||
SELECT CONCAT('g',CONCAT(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
|
||||
SELECT CONCAT('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
|
||||
SELECT CONCAT_WS('g',CONCAT_WS(';',repeat('a',60), repeat('b',60), repeat('c',60), repeat ('d',100)),'h')
|
||||
select length(concat(repeat("a",3200),repeat("a",3200)))
|
||||
select length(replace("aaaaa","a",concat(repeat("a",10000),repeat("a",12))))
|
||||
select repeat('北京taos', 6)
|
||||
select repeat(nch1, 6) from ts_4893.meters order by ts limit 5
|
||||
select repeat(var1, 6) from ts_4893.meters order by ts limit 5
|
||||
select position(nch1 in repeat(nch1,6)) from ts_4893.meters order by ts limit 5
|
||||
select position(var1 in repeat(var1,6)) from ts_4893.meters order by ts limit 5
|
||||
select position(nch1 in repeat(var1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5
|
||||
select position(var1 in repeat(nch1,6)) from ts_4893.meters where nch1 = var1 order by ts limit 5
|
||||
select repeat(nch1, id) from ts_4893.meters where id > 0 order by ts limit 5
|
||||
select repeat(var1, id) from ts_4893.meters where id > 0 order by ts limit 5
|
||||
select repeat('nch1', id) from ts_4893.meters where id > 0 order by ts limit 5
|
||||
select repeat('var1', id) from ts_4893.meters where id > 0 order by ts limit 5
|
||||
select repeat('taos', 1)
|
||||
select repeat('taos', 2)
|
||||
select repeat(name, 3) from ts_4893.d0 order by ts limit 10
|
||||
select repeat(name, 3) from ts_4893.meters order by ts limit 10
|
||||
select repeat(nch1, 3) from ts_4893.d0 order by ts limit 10
|
||||
select repeat(nch1, 3) from ts_4893.meters order by ts limit 10
|
||||
select repeat(var1, 3) from ts_4893.d0 order by ts limit 10
|
||||
select repeat(var1, 3) from ts_4893.meters order by ts limit 10
|
||||
select repeat(name, groupid) from ts_4893.d0 order by ts limit 10
|
||||
select repeat(name, groupid) from ts_4893.meters order by ts limit 10
|
||||
select repeat(nch1, groupid) from ts_4893.d0 order by ts limit 10
|
||||
select repeat(nch1, groupid) from ts_4893.meters order by ts limit 10
|
||||
select repeat(null, 3)
|
||||
select repeat('taos', null)
|
||||
select repeat('taos', 0)
|
||||
select repeat('', 5)
|
||||
select repeat('A', 0)
|
||||
select repeat('A', 10)
|
||||
select repeat('A B', 5)
|
||||
select repeat('ABC', 1)
|
||||
select repeat('Hello', 2)
|
||||
select repeat('HelloWorld', 2)
|
||||
select repeat('123', 5)
|
||||
select repeat('12345', 3)
|
||||
select repeat('!@#', 3)
|
||||
select repeat('你好', 2)
|
||||
select repeat('abc', length('abc'))
|
||||
select repeat(concat('A', 'B', 'C'), 3)
|
||||
select repeat(upper('abc'), 4)
|
||||
select repeat(trim(' Hello '), 3)
|
||||
select name, repeat(name, 3) from ts_4893.meters limit 1
|
||||
select name, repeat(substring(name, 1, 5), 2) from ts_4893.meters limit 1
|
||||
select var1, repeat(var1, 2) from ts_4893.meters limit 1
|
||||
select nch1, repeat(nch1, 4) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,98 +1,120 @@
|
|||
select replace('aaaa','a','b');
|
||||
select replace('aaaa','aa','b');
|
||||
select replace('aaaa','a','bb');
|
||||
select replace('aaaa','','b');
|
||||
select replace('bbbb','a','c');
|
||||
select replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper('false'),' ','test'),'FALSE','REAL') ;
|
||||
select replace('北京涛思','北京', '');
|
||||
select replace('北京涛思','涛思', '');
|
||||
select replace('北京涛思.com','思.', '北京');
|
||||
select replace('北京涛思.com','北com', '北京涛');
|
||||
select replace('北京涛思', char(ascii('北')), 'wrongans');
|
||||
select replace(nch1, 'a', 'b') from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, 'a', '啊') from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, '一', '壹') from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, '一', '1') from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, nch2, 'nch2') from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, var2, 'var2') from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, '三', nch2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, '三', var2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, nch2, var2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5;
|
||||
select replace(nch1, var2, nch2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5;
|
||||
select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5;
|
||||
select replace(var1, 'a', 'b') from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, 'a', '啊') from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, '一', '壹') from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, '一', '1') from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, nch2, 'nch2') from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, var2, 'var2') from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, '三', nch2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, '三', var2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, nch2, var2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5;
|
||||
select replace(var1, var2, nch2) from ts_4893.meters order by ts limit 5;
|
||||
select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5;
|
||||
select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5;
|
||||
select replace('aabbccdd','aa', 'ee');
|
||||
select replace('aabbccdd','AA', 'ee');
|
||||
select replace('北京','北' , '南');
|
||||
select replace('北京','京' , '南');
|
||||
select replace('北京taos','北' , '南');
|
||||
select replace(nch1, nch2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(nch1, nch2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(nch1, var2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(nch1, var2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(var1, nch2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(var1, nch2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(var1, var2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(var1, var2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(nch1, nch2, var1) from ts_4893.d0 order by ts limit 10;
|
||||
select replace(nch1, nch2, var1) from ts_4893.meters order by ts limit 10;
|
||||
select replace('aaaa','a','b')
|
||||
select replace('aaaa','aa','b')
|
||||
select replace('aaaa','a','bb')
|
||||
select replace('aaaa','','b')
|
||||
select replace('bbbb','a','c')
|
||||
select replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper('false'),' ','test'),'FALSE','REAL')
|
||||
select replace('北京涛思','北京', '')
|
||||
select replace('北京涛思','涛思', '')
|
||||
select replace('北京涛思.com','思.', '北京')
|
||||
select replace('北京涛思.com','北com', '北京涛')
|
||||
select replace('北京涛思', char(ascii('北')), 'wrongans')
|
||||
select replace(nch1, 'a', 'b') from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, 'a', '啊') from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, '一', '壹') from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, '一', '1') from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, var2, 'var2') from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, '三', nch2) from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, '三', var2) from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, nch2, var2) from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
|
||||
select replace(nch1, var2, nch2) from ts_4893.meters order by ts limit 5
|
||||
select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
|
||||
select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
|
||||
select replace(var1, 'a', 'b') from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, 'a', '啊') from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, '一', '壹') from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, '一', '1') from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, var2, 'var2') from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, '三', nch2) from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, '三', var2) from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, nch2, var2) from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
|
||||
select replace(var1, var2, nch2) from ts_4893.meters order by ts limit 5
|
||||
select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
|
||||
select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
select replace('aabbccdd','aa', 'ee')
|
||||
select replace('aabbccdd','AA', 'ee')
|
||||
select replace('北京','北' , '南')
|
||||
select replace('北京','京' , '南')
|
||||
select replace('北京taos','北' , '南')
|
||||
select replace(nch1, nch2, 't') from ts_4893.d0 order by ts limit 10
|
||||
select replace(nch1, nch2, 't') from ts_4893.meters order by ts limit 10
|
||||
select replace(nch1, var2, 't') from ts_4893.d0 order by ts limit 10
|
||||
select replace(nch1, var2, 't') from ts_4893.meters order by ts limit 10
|
||||
select replace(var1, nch2, 't') from ts_4893.d0 order by ts limit 10
|
||||
select replace(var1, nch2, 't') from ts_4893.meters order by ts limit 10
|
||||
select replace(var1, var2, 't') from ts_4893.d0 order by ts limit 10
|
||||
select replace(var1, var2, 't') from ts_4893.meters order by ts limit 10
|
||||
select replace(nch1, nch2, var1) from ts_4893.d0 order by ts limit 10
|
||||
select replace(nch1, nch2, var1) from ts_4893.meters order by ts limit 10
|
||||
select replace(null, 'aa', 'ee')
|
||||
select replace(null, 'A', 'B')
|
||||
select replace('', '', 'B')
|
||||
select replace('', 'A', 'B')
|
||||
select replace('A', 'A', '')
|
||||
select replace('aabbccdd', null, 'ee')
|
||||
select replace('Hello', 'Z', 'X')
|
||||
select replace('Hello World', ' ', '_')
|
||||
select replace('Hello World', 'World', 'MySQL')
|
||||
select replace('12345', '5', 'five')
|
||||
select replace('中国', '中', '国')
|
||||
select replace('é', 'e', 'a')
|
||||
select replace('!@#', '@', '#')
|
||||
select replace('123456', '7', 'eight')
|
||||
select replace(concat('A', 'B', 'C'), 'B', 'Z')
|
||||
select replace(upper('abc'), 'A', 'X')
|
||||
select replace(trim(' Hello '), 'l', 'L')
|
||||
select replace(lower('HELLO'), 'h', 'H')
|
||||
select name, replace(substring(name, 1, 5), 'e', 'o') from ts_4893.meters limit 1
|
||||
select name, replace(name, 'a', 'o') from ts_4893.meters limit 1
|
||||
select var1, replace(var1, '1', 'one') from ts_4893.meters limit 1
|
||||
select nch1, replace(nch1, 'n', 'm') from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,30 +1,49 @@
|
|||
select ROUND(10.55, 3);
|
||||
select ROUND(10.55, 2);
|
||||
select ROUND(10.55, 1);
|
||||
select ROUND(10.55, 0);
|
||||
select ROUND(10.55);
|
||||
select ROUND(10.55, -1);
|
||||
select ROUND(10.55, -10);
|
||||
select ROUND(-10.55, 1);
|
||||
select ROUND(99, 1);
|
||||
select ROUND(111.1111);
|
||||
select ROUND(111.5111);
|
||||
select ROUND(10.55) + 1;
|
||||
select ROUND(10.55, 1) + 1;
|
||||
select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123.123456789, 9), 8), 7), 6), 5), 4));
|
||||
select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123456789.123456789, -1), -2), -3), -4), -5), -6));
|
||||
select ROUND(current) from ts_4893.meters order by ts limit 20;
|
||||
select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit 10;
|
||||
select ROUND(current, id) from ts_4893.meters order by ts limit 10;
|
||||
select ROUND(current, 1) from ts_4893.meters order by ts limit 10;
|
||||
select round(10.55, 3);
|
||||
select round(10.55, 2);
|
||||
select round(10.55, 1);
|
||||
select round(10.55, 0);
|
||||
select round(10.55);
|
||||
select round(10.55, -1);
|
||||
select round(10.55, -10);
|
||||
select round(-10.55, 1);
|
||||
select round(99, 1);
|
||||
select round(current) from ts_4893.d0 order by ts limit 10;
|
||||
select round(current) from ts_4893.meters order by ts limit 10;
|
||||
select ROUND(10.55, 3)
|
||||
select ROUND(10.55, 2)
|
||||
select ROUND(10.55, 1)
|
||||
select ROUND(10.55, 0)
|
||||
select ROUND(10.55)
|
||||
select ROUND(10.55, -1)
|
||||
select ROUND(10.55, -10)
|
||||
select ROUND(-10.55, 1)
|
||||
select ROUND(99, 1)
|
||||
select ROUND(111.1111)
|
||||
select ROUND(111.5111)
|
||||
select ROUND(10.55) + 1
|
||||
select ROUND(10.55, 1) + 1
|
||||
select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123.123456789, 9), 8), 7), 6), 5), 4))
|
||||
select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123456789.123456789, -1), -2), -3), -4), -5), -6))
|
||||
select ROUND(current) from ts_4893.meters order by ts limit 20
|
||||
select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit 10
|
||||
select ROUND(current, id) from ts_4893.meters order by ts limit 10
|
||||
select ROUND(current, 1) from ts_4893.meters order by ts limit 10
|
||||
select round(10.55, 3)
|
||||
select round(10.55, 2)
|
||||
select round(10.55, 1)
|
||||
select round(10.55, 0)
|
||||
select round(10.55)
|
||||
select round(10.55, -1)
|
||||
select round(10.55, -10)
|
||||
select round(-10.55, 1)
|
||||
select round(99, 1)
|
||||
select round(current) from ts_4893.d0 order by ts limit 10
|
||||
select round(current) from ts_4893.meters order by ts limit 10
|
||||
select round(10, null)
|
||||
select round(null, 2)
|
||||
select round(123.456, null)
|
||||
select round(100)
|
||||
select round(0.00123, -2)
|
||||
select round(123.456, 0)
|
||||
select round(123.456, -5)
|
||||
select round(12345.6789, -2)
|
||||
select round(-123.456, 2)
|
||||
select round(-1234.5678, 2)
|
||||
select round(voltage, 0) from ts_4893.meters limit 1
|
||||
select round(current, 1) from ts_4893.meters limit 1
|
||||
select round(phase, 3) from ts_4893.meters limit 1
|
||||
select round(voltage, -1) from ts_4893.meters limit 1
|
||||
select round(current * voltage, 2) from ts_4893.meters limit 1
|
||||
select round(abs(voltage), 2) from ts_4893.meters limit 1
|
||||
select round(pi() * phase, 3) from ts_4893.meters limit 1
|
||||
select round(sqrt(voltage), 2) from ts_4893.meters limit 1
|
||||
select round(log(current), 2) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,36 +1,48 @@
|
|||
select SIGN(0);
|
||||
select SIGN(1);
|
||||
select SIGN(1.5);
|
||||
select SIGN(100);
|
||||
select SIGN(-1);
|
||||
select SIGN(-1.5);
|
||||
select SIGN(-100);
|
||||
select SIGN(1) + 1;
|
||||
select SIGN(1) - 1;
|
||||
select SIGN(1) * 1;
|
||||
select SIGN(1) / 1;
|
||||
select SIGN(1) from ts_4893.meters limit 5;
|
||||
select SIGN(1) + 1 from ts_4893.meters limit 1;
|
||||
select SIGN(1) - 1 from ts_4893.meters limit 1;
|
||||
select SIGN(1) * 2 from ts_4893.meters limit 1;
|
||||
select SIGN(1) / 2 from ts_4893.meters limit 1;
|
||||
select SIGN(2) + SIGN(1) from ts_4893.meters limit 1;
|
||||
select SIGN(2) - SIGN(1) from ts_4893.meters limit 1;
|
||||
select SIGN(2) * SIGN(1) from ts_4893.meters limit 1;
|
||||
select SIGN(2) / SIGN(1) from ts_4893.meters limit 1;
|
||||
select SIGN(1) + id from ts_4893.meters order by ts limit 5;
|
||||
select SIGN(id) + id from ts_4893.meters order by ts limit 5;
|
||||
select SIGN(abs(10));
|
||||
select SIGN(abs(-10));
|
||||
select abs(SIGN(10));
|
||||
select pow(SIGN(10), 2);
|
||||
select sqrt(SIGN(10));
|
||||
select cast(SIGN(10) as int);
|
||||
select SIGN(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select SIGN(SIGN(SIGN(SIGN(0))));
|
||||
select sign(1);
|
||||
select sign(10);
|
||||
select sign(-1);
|
||||
select sign(-10);
|
||||
select sign(current) from ts_4893.d0 order by ts limit 10;
|
||||
select sign(current) from ts_4893.meters order by ts limit 10;
|
||||
select SIGN(0)
|
||||
select SIGN(1)
|
||||
select SIGN(1.5)
|
||||
select SIGN(100)
|
||||
select SIGN(-1)
|
||||
select SIGN(-1.5)
|
||||
select SIGN(-100)
|
||||
select SIGN(1) + 1
|
||||
select SIGN(1) - 1
|
||||
select SIGN(1) * 1
|
||||
select SIGN(1) / 1
|
||||
select SIGN(1) from ts_4893.meters limit 5
|
||||
select SIGN(1) + 1 from ts_4893.meters limit 1
|
||||
select SIGN(1) - 1 from ts_4893.meters limit 1
|
||||
select SIGN(1) * 2 from ts_4893.meters limit 1
|
||||
select SIGN(1) / 2 from ts_4893.meters limit 1
|
||||
select SIGN(2) + SIGN(1) from ts_4893.meters limit 1
|
||||
select SIGN(2) - SIGN(1) from ts_4893.meters limit 1
|
||||
select SIGN(2) * SIGN(1) from ts_4893.meters limit 1
|
||||
select SIGN(2) / SIGN(1) from ts_4893.meters limit 1
|
||||
select SIGN(1) + id from ts_4893.meters order by ts limit 5
|
||||
select SIGN(id) + id from ts_4893.meters order by ts limit 5
|
||||
select SIGN(abs(10))
|
||||
select SIGN(abs(-10))
|
||||
select abs(SIGN(10))
|
||||
select pow(SIGN(10), 2)
|
||||
select sqrt(SIGN(10))
|
||||
select cast(SIGN(10) as int)
|
||||
select SIGN(sqrt(id)) from ts_4893.meters order by ts limit 5
|
||||
select SIGN(SIGN(SIGN(SIGN(0))))
|
||||
select sign(1)
|
||||
select sign(10)
|
||||
select sign(-1)
|
||||
select sign(-10)
|
||||
select sign(current) from ts_4893.d0 order by ts limit 10
|
||||
select sign(current) from ts_4893.meters order by ts limit 10
|
||||
select sign(null)
|
||||
select sign(25)
|
||||
select sign(-10)
|
||||
select sign(0.1)
|
||||
select sign(-0.1)
|
||||
select sign(current) from ts_4893.meters limit 1
|
||||
select sign(voltage) from ts_4893.meters limit 1
|
||||
select sign(phase) from ts_4893.meters limit 1
|
||||
select sign(abs(voltage)) from ts_4893.meters limit 1
|
||||
select sign(round(current)) from ts_4893.meters limit 1
|
||||
select sign(sqrt(voltage)) from ts_4893.meters limit 1
|
||||
select sign(log(current + 1)) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
select STDDEV(current) from ts_4893.meters;
|
||||
select STDDEV(current) from ts_4893.meters interval(1d) order by 1 limit 10;
|
||||
select STDDEV(id) from ts_4893.meters;
|
||||
select STDDEV(id) from ts_4893.meters interval(1d) limit 10;
|
||||
select STDDEV(id) from ts_4893.meters where id > 100;
|
||||
select STDDEV(id) from ts_4893.meters interval(1d) order by 1 limit 10;
|
||||
select stddev_pop(id) from ts_4893.d0;
|
||||
select stddev_pop(id) from ts_4893.meters;
|
||||
select stddev_pop(current) from ts_4893.d0;
|
||||
select stddev_pop(current) from ts_4893.meters;
|
||||
select STDDEV(current) from ts_4893.meters
|
||||
select STDDEV(current) from ts_4893.meters interval(1d) order by 1 limit 10
|
||||
select STDDEV(id) from ts_4893.meters
|
||||
select STDDEV(id) from ts_4893.meters interval(1d) limit 10
|
||||
select STDDEV(id) from ts_4893.meters where id > 100
|
||||
select STDDEV(id) from ts_4893.meters interval(1d) order by 1 limit 10
|
||||
select stddev_pop(null) from ts_4893.meters
|
||||
select stddev_pop(id) from ts_4893.d0
|
||||
select stddev_pop(id) from ts_4893.meters
|
||||
select stddev_pop(current) from ts_4893.d0
|
||||
select stddev_pop(current) from ts_4893.meters
|
||||
select stddev_pop(voltage) from ts_4893.meters
|
||||
select stddev_pop(voltage) from ts_4893.meters where voltage is not null
|
||||
select stddev_pop(phase) from ts_4893.meters
|
||||
select stddev_pop(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
|
||||
select stddev_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
|
||||
select round(stddev_pop(current), 2) from ts_4893.meters
|
||||
select pow(stddev_pop(current), 2) from ts_4893.meters
|
||||
select log(stddev_pop(voltage) + 1) from ts_4893.meters
|
||||
select groupid, stddev_pop(voltage) from ts_4893.meters group by groupid order by groupid
|
||||
select location, stddev_pop(current) from ts_4893.meters group by location order by location
|
||||
select location, stddev_pop(voltage) from ts_4893.meters group by location order by location
|
||||
|
|
|
@ -1,139 +1,165 @@
|
|||
select SUBSTRING('Hello.World!', 1);
|
||||
select SUBSTRING('Hello.World!', 1, 5);
|
||||
select SUBSTRING('Hello.World!', 1, 20);
|
||||
select SUBSTRING('Hello.World!' FROM 1);
|
||||
select SUBSTRING('Hello.World!' FROM 1 FOR 5);
|
||||
select SUBSTRING('Hello.World!' FROM 1 FOR 20);
|
||||
select SUBSTRING('Hello.World!', -6);
|
||||
select SUBSTRING('Hello.World!', -6, 5);
|
||||
select SUBSTRING('Hello.World!', -6, 20);
|
||||
select SUBSTRING('Hello.World!' FROM -6);
|
||||
select SUBSTRING('Hello.World!' FROM -6 FOR 5);
|
||||
select SUBSTRING('Hello.World!' FROM -6 FOR 20);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', 1);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', 1, 5);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', 1, 20);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM 1);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 5);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 20);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', -6);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', -6, 5);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', -6, 20);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM -6);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 5);
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 20);
|
||||
select SUBSTRING(nch1, 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, 1, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, 1, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM 1 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM 1 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, -6, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, -6, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM -6 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM -6 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, 1, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, 1, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM 1 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM 1 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, -6, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, -6, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM -6 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM -6 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, sign(id), 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, sign(id), 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, sign(id), 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM sign(id)) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, sign(id), 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, sign(id), 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, sign(id), 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM sign(id)) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1, 2, id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(nch1 FROM 2 FOR id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1, 2, id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTRING(var1 FROM 2 FOR id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR('Hello.World!', 1);
|
||||
select SUBSTR('Hello.World!', 1, 5);
|
||||
select SUBSTR('Hello.World!', 1, 20);
|
||||
select SUBSTR('Hello.World!' FROM 1);
|
||||
select SUBSTR('Hello.World!' FROM 1 FOR 5);
|
||||
select SUBSTR('Hello.World!' FROM 1 FOR 20);
|
||||
select SUBSTR('Hello.World!', -6);
|
||||
select SUBSTR('Hello.World!', -6, 5);
|
||||
select SUBSTR('Hello.World!', -6, 20);
|
||||
select SUBSTR('Hello.World!' FROM -6);
|
||||
select SUBSTR('Hello.World!' FROM -6 FOR 5);
|
||||
select SUBSTR('Hello.World!' FROM -6 FOR 20);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', 1);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', 1, 5);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', 1, 20);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM 1);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 5);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 20);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', -6);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', -6, 5);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', -6, 20);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM -6);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 5);
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 20);
|
||||
select SUBSTR(nch1, 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, 1, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, 1, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM 1 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM 1 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, -6, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, -6, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM -6 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM -6 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, 1, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, 1, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM 1 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM 1 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, -6, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, -6, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM -6 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM -6 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, sign(id), 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, sign(id), 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, sign(id), 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM sign(id)) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, sign(id), 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, sign(id), 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, sign(id), 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM sign(id)) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1, 2, id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(nch1 FROM 2 FOR id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1, 2, id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select SUBSTR(var1 FROM 2 FOR id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5;
|
||||
select substring('tdengine', 2);
|
||||
select substring('tdengine', 8);
|
||||
select substring('tdengine', 1, 3);
|
||||
select substring('tdengine', 2, 99);
|
||||
select substring('tdengine', -1, 10);
|
||||
select substring('中国', 1, 3);
|
||||
select substring('中国tdengine', 1, 3);
|
||||
select substring(var1, 1, 5) from ts_4893.d0 order by ts limit 10;
|
||||
select substring(var1, 1, 5) from ts_4893.meters order by ts limit 10;
|
||||
select substring(nch1, 1, 5) from ts_4893.d0 order by ts limit 10;
|
||||
select substring(nch1, 1, 5) from ts_4893.meters order by ts limit 10;
|
||||
select SUBSTRING('Hello.World!', 1)
|
||||
select SUBSTRING('Hello.World!', 1, 5)
|
||||
select SUBSTRING('Hello.World!', 1, 20)
|
||||
select SUBSTRING('Hello.World!' FROM 1)
|
||||
select SUBSTRING('Hello.World!' FROM 1 FOR 5)
|
||||
select SUBSTRING('Hello.World!' FROM 1 FOR 20)
|
||||
select SUBSTRING('Hello.World!', -6)
|
||||
select SUBSTRING('Hello.World!', -6, 5)
|
||||
select SUBSTRING('Hello.World!', -6, 20)
|
||||
select SUBSTRING('Hello.World!' FROM -6)
|
||||
select SUBSTRING('Hello.World!' FROM -6 FOR 5)
|
||||
select SUBSTRING('Hello.World!' FROM -6 FOR 20)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', 1)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', 1, 5)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', 1, 20)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM 1)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 5)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 20)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', -6)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', -6, 5)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.', -6, 20)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM -6)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 5)
|
||||
select SUBSTRING('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 20)
|
||||
select SUBSTRING(nch1, 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, 1, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, 1, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM 1 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM 1 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, -6, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, -6, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM -6 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM -6 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, 1, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, 1, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM 1 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM 1 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, -6, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, -6, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM -6 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM -6 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, sign(id), 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, sign(id), 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, sign(id), 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM sign(id)) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, sign(id), 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, sign(id), 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, sign(id), 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM sign(id)) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1, 2, id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(nch1 FROM 2 FOR id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1, 2, id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTRING(var1 FROM 2 FOR id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR('Hello.World!', 1)
|
||||
select SUBSTR('Hello.World!', 1, 5)
|
||||
select SUBSTR('Hello.World!', 1, 20)
|
||||
select SUBSTR('Hello.World!' FROM 1)
|
||||
select SUBSTR('Hello.World!' FROM 1 FOR 5)
|
||||
select SUBSTR('Hello.World!' FROM 1 FOR 20)
|
||||
select SUBSTR('Hello.World!', -6)
|
||||
select SUBSTR('Hello.World!', -6, 5)
|
||||
select SUBSTR('Hello.World!', -6, 20)
|
||||
select SUBSTR('Hello.World!' FROM -6)
|
||||
select SUBSTR('Hello.World!' FROM -6 FOR 5)
|
||||
select SUBSTR('Hello.World!' FROM -6 FOR 20)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', 1)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', 1, 5)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', 1, 20)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM 1)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 5)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM 1 FOR 20)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', -6)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', -6, 5)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.', -6, 20)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM -6)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 5)
|
||||
select SUBSTR('北京涛思数据科技有限公司,tdengine.' FROM -6 FOR 20)
|
||||
select SUBSTR(nch1, 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, 1, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, 1, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM 1 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM 1 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, -6, 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, -6, 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM -6) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM -6 FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM -6 FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, 1, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, 1, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM 1 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM 1 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, -6, 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, -6, 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM -6) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM -6 FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM -6 FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, sign(id), 1) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, sign(id), 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, sign(id), 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM sign(id)) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, sign(id), 1) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, sign(id), 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, sign(id), 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM sign(id)) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM sign(id) FOR 5) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM sign(id) FOR 20) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1, 2, id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(nch1 FROM 2 FOR id) from ts_4893.meters where char_length(nch1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1, 2, id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select SUBSTR(var1 FROM 2 FOR id) from ts_4893.meters where char_length(var1) > 6 order by ts limit 5
|
||||
select substring('tdengine', 2)
|
||||
select substring('tdengine', 8)
|
||||
select substring('tdengine', 1, 3)
|
||||
select substring('tdengine', 2, 99)
|
||||
select substring('tdengine', -1, 10)
|
||||
select substring('中国', 1, 3)
|
||||
select substring('中国tdengine', 1, 3)
|
||||
select substring(var1, 1, 5) from ts_4893.d0 order by ts limit 10
|
||||
select substring(var1, 1, 5) from ts_4893.meters order by ts limit 10
|
||||
select substring(nch1, 1, 5) from ts_4893.d0 order by ts limit 10
|
||||
select substring(nch1, 1, 5) from ts_4893.meters order by ts limit 10
|
||||
select substring(null, 1, 3)
|
||||
select substring('tdengine', null, 3)
|
||||
select substring('tdengine', 0)
|
||||
select substring('tdengine', 10)
|
||||
select substring('tdengine', 1, null)
|
||||
select substring('tdengine', 1, 0)
|
||||
select substring('tdengine', 1, -1)
|
||||
select substr(null, 1, 3)
|
||||
select substr('Hello', 1, 3)
|
||||
select substr('', 1, 5)
|
||||
select substr('ABCDE', 0, 3)
|
||||
select substr('ABCDEFG', -3, 2)
|
||||
select substr('HelloWorld', 2, 5)
|
||||
select substr('1234567890', -5, 5)
|
||||
select substr('!@#$%^&*()', 2, 4)
|
||||
select substr('你好世界', 3, 2)
|
||||
select substr('ABCDEFG', 10, 5)
|
||||
select substr('ABCDEFG', -1, 3)
|
||||
select substr('1234567890', -15, 5)
|
||||
select substr(concat('Hello', 'World'), 1, 5)
|
||||
select substr('HelloWorld', 1, length('Hello'))
|
||||
select substr(upper('helloworld'), 2, 4)
|
||||
select substr(trim(' HelloWorld '), 1, 5)
|
||||
select name, substr(name, 1, 3) from ts_4893.meters limit 1
|
||||
select var1, substr(var1, 1, 6) from ts_4893.meters limit 1
|
||||
select nch1, substr(nch1, 2, 4) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,93 +1,119 @@
|
|||
select substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2);
|
||||
select substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2);
|
||||
select substring_index('www.taosdata.com','taos',1);
|
||||
select substring_index('www.taosdata.com','taos',-1);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 1);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -1);
|
||||
select substring_index('www.taosdata.com','.',-2);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 100);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -100);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483647);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483647);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483648);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483648);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483649);
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483649);
|
||||
select substring_index('.taosdata.com','.',-2);
|
||||
select substring_index('.taosdata.com','.tcx',-1);
|
||||
select substring_index('aaaaaaaaa1','aa',2);
|
||||
select substring_index('aaaaaaaaa1','aa',3);
|
||||
select substring_index('aaaaaaaaa1','aa',4);
|
||||
select substring_index('aaaaaaaaa1','aa',5);
|
||||
select substring_index('aaaaaaaaa1','aaa',2);
|
||||
select substring_index('aaaaaaaaa1','aaa',3);
|
||||
select substring_index('aaaaaaaaa1','aaa',4);
|
||||
select substring_index('aaaaaaaaa1','aaaa',2);
|
||||
select substring_index('aaaaaaaaa1','1',1);
|
||||
select substring_index('aaaaaaaaa1','a',-1);
|
||||
select substring_index('aaaaaaaaa1','aa',-1);
|
||||
select substring_index('aaaaaaaaa1','aa',-2);
|
||||
select substring_index('aaaaaaaaa1','aa',-3);
|
||||
select substring_index('aaaaaaaaa1','aa',-4);
|
||||
select substring_index('aaaaaaaaa1','aa',-5);
|
||||
select substring_index('aaaaaaaaa1','aaa',-1);
|
||||
select substring_index('aaaaaaaaa1','aaa',-2);
|
||||
select substring_index('aaaaaaaaa1','aaa',-3);
|
||||
select substring_index('aaaaaaaaa1','aaa',-4);
|
||||
select substring_index('the king of thethe hill','the',-2);
|
||||
select substring_index('the king of the the hill','the',-2);
|
||||
select substring_index('the king of the the hill','the',-2);
|
||||
select substring_index('the king of the the hill',' the ',-1);
|
||||
select substring_index('the king of the the hill',' the ',-2);
|
||||
select substring_index('the king of the the hill',' ',-1);
|
||||
select substring_index('the king of the the hill',' ',-2);
|
||||
select substring_index('the king of the the hill',' ',-3);
|
||||
select substring_index('the king of the the hill',' ',-4);
|
||||
select substring_index('the king of the the hill',' ',-5);
|
||||
select substring_index('the king of the.the hill','the',-2);
|
||||
select substring_index('the king of thethethe.the hill','the',-3);
|
||||
select substring_index('the king of thethethe.the hill','the',-1);
|
||||
select substring_index('the king of the the hill','the',2);
|
||||
select substring_index('the king of the the hill','the',3);
|
||||
select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) > 1 order by ts limit 5;
|
||||
select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5;
|
||||
select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5;
|
||||
select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5;
|
||||
select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) > 1 order by ts limit 5;
|
||||
select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5;
|
||||
select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5;
|
||||
select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5;
|
||||
select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) > 1 order by ts limit 5;
|
||||
select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5;
|
||||
select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5;
|
||||
select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5;
|
||||
select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) > 1 order by ts limit 5;
|
||||
select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5;
|
||||
select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5;
|
||||
select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
select substring_index(nch1, '123', 1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5;
|
||||
select substring_index(nch1, '123', -1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5;
|
||||
select substring_index(nch1, '123', id) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5;
|
||||
select substring_index(var1, '123', 1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5;
|
||||
select substring_index(var1, '123', -1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5;
|
||||
select substring_index(var1, '123', id) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5;
|
||||
select substring_index('www.taosdata.com', '.', 2);
|
||||
select substring_index('www.taosdata.com', '.', -2);
|
||||
select substring_index('中国.科学.www.taosdata.com', '.', 2);
|
||||
select substring_index('北京。涛思。数据。科技', '。', 2);
|
||||
select substring_index(nch1, 'a', 2) from ts_4893.d0 order by ts limit 10;
|
||||
select substring_index(nch1, 'a', 2) from ts_4893.meters order by ts limit 10;
|
||||
select substring_index(nch1, nch2, 2) from ts_4893.d0 order by ts limit 10;
|
||||
select substring_index(nch1, nch2, 2) from ts_4893.meters order by ts limit 10;
|
||||
select substring_index(nch1, var2, 2) from ts_4893.d0 order by ts limit 10;
|
||||
select substring_index(nch1, var2, 2) from ts_4893.meters order by ts limit 10;
|
||||
select substring_index(var1, nch2, 2) from ts_4893.d0 order by ts limit 10;
|
||||
select substring_index(var1, nch2, 2) from ts_4893.meters order by ts limit 10;
|
||||
select substring_index(var1, var2, 2) from ts_4893.d0 order by ts limit 10;
|
||||
select substring_index(var1, var2, 2) from ts_4893.meters order by ts limit 10;
|
||||
select substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)
|
||||
select substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2)
|
||||
select substring_index('www.taosdata.com','taos',1)
|
||||
select substring_index('www.taosdata.com','taos',-1)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 1)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -1)
|
||||
select substring_index('www.taosdata.com','.',-2)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 100)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -100)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483647)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483647)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483648)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483648)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483649)
|
||||
SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483649)
|
||||
select substring_index('.taosdata.com','.',-2)
|
||||
select substring_index('.taosdata.com','.tcx',-1)
|
||||
select substring_index('aaaaaaaaa1','aa',2)
|
||||
select substring_index('aaaaaaaaa1','aa',3)
|
||||
select substring_index('aaaaaaaaa1','aa',4)
|
||||
select substring_index('aaaaaaaaa1','aa',5)
|
||||
select substring_index('aaaaaaaaa1','aaa',2)
|
||||
select substring_index('aaaaaaaaa1','aaa',3)
|
||||
select substring_index('aaaaaaaaa1','aaa',4)
|
||||
select substring_index('aaaaaaaaa1','aaaa',2)
|
||||
select substring_index('aaaaaaaaa1','1',1)
|
||||
select substring_index('aaaaaaaaa1','a',-1)
|
||||
select substring_index('aaaaaaaaa1','aa',-1)
|
||||
select substring_index('aaaaaaaaa1','aa',-2)
|
||||
select substring_index('aaaaaaaaa1','aa',-3)
|
||||
select substring_index('aaaaaaaaa1','aa',-4)
|
||||
select substring_index('aaaaaaaaa1','aa',-5)
|
||||
select substring_index('aaaaaaaaa1','aaa',-1)
|
||||
select substring_index('aaaaaaaaa1','aaa',-2)
|
||||
select substring_index('aaaaaaaaa1','aaa',-3)
|
||||
select substring_index('aaaaaaaaa1','aaa',-4)
|
||||
select substring_index('the king of thethe hill','the',-2)
|
||||
select substring_index('the king of the the hill','the',-2)
|
||||
select substring_index('the king of the the hill','the',-2)
|
||||
select substring_index('the king of the the hill',' the ',-1)
|
||||
select substring_index('the king of the the hill',' the ',-2)
|
||||
select substring_index('the king of the the hill',' ',-1)
|
||||
select substring_index('the king of the the hill',' ',-2)
|
||||
select substring_index('the king of the the hill',' ',-3)
|
||||
select substring_index('the king of the the hill',' ',-4)
|
||||
select substring_index('the king of the the hill',' ',-5)
|
||||
select substring_index('the king of the.the hill','the',-2)
|
||||
select substring_index('the king of thethethe.the hill','the',-3)
|
||||
select substring_index('the king of thethethe.the hill','the',-1)
|
||||
select substring_index('the king of the the hill','the',2)
|
||||
select substring_index('the king of the the hill','the',3)
|
||||
select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) > 1 order by ts limit 5
|
||||
select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5
|
||||
select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) > 1 order by ts limit 5
|
||||
select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5
|
||||
select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) > 1 order by ts limit 5
|
||||
select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5
|
||||
select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) > 1 order by ts limit 5
|
||||
select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5
|
||||
select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
select substring_index(nch1, '123', 1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
|
||||
select substring_index(nch1, '123', -1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
|
||||
select substring_index(nch1, '123', id) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
|
||||
select substring_index(var1, '123', 1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
|
||||
select substring_index(var1, '123', -1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
|
||||
select substring_index(var1, '123', id) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
|
||||
select substring_index('www.taosdata.com', '.', 2)
|
||||
select substring_index('www.taosdata.com', '.', -2)
|
||||
select substring_index('中国.科学.www.taosdata.com', '.', 2)
|
||||
select substring_index('北京。涛思。数据。科技', '。', 2)
|
||||
select substring_index(nch1, 'a', 2) from ts_4893.d0 order by ts limit 10
|
||||
select substring_index(nch1, 'a', 2) from ts_4893.meters order by ts limit 10
|
||||
select substring_index(nch1, nch2, 2) from ts_4893.d0 order by ts limit 10
|
||||
select substring_index(nch1, nch2, 2) from ts_4893.meters order by ts limit 10
|
||||
select substring_index(nch1, var2, 2) from ts_4893.d0 order by ts limit 10
|
||||
select substring_index(nch1, var2, 2) from ts_4893.meters order by ts limit 10
|
||||
select substring_index(var1, nch2, 2) from ts_4893.d0 order by ts limit 10
|
||||
select substring_index(var1, nch2, 2) from ts_4893.meters order by ts limit 10
|
||||
select substring_index(var1, var2, 2) from ts_4893.d0 order by ts limit 10
|
||||
select substring_index(var1, var2, 2) from ts_4893.meters order by ts limit 10
|
||||
select substring_index(null, '.', 2)
|
||||
select substring_index('www.taosdata.com', null, 2)
|
||||
select substring_index('www.taosdata.com', '.', 0)
|
||||
select substring_index('www.taosdata.com', '.', null)
|
||||
select substring_index('a.b.c', '.', 1)
|
||||
select substring_index('a.b.c', '.', 2)
|
||||
select substring_index('a.b.c', '.', -1)
|
||||
select substring_index('', '.', 1)
|
||||
select substring_index('apple.orange.banana', '.', 2)
|
||||
select substring_index('192.168.1.1', '.', 3)
|
||||
select substring_index('abc@xyz.com', '.', 5)
|
||||
select substring_index('123456789', '.', 1)
|
||||
select substring_index('abcdef', ' ', 2)
|
||||
select substring_index('ABCDEFG', '-', -1)
|
||||
select substring_index('apple', '.', -3)
|
||||
select substring_index(concat('apple', '.', 'orange', '.', 'banana'), '.', 2)
|
||||
select substring_index('apple.orange.banana', '.', length('apple'))
|
||||
select substring_index(upper('apple.orange.banana'), '.', 2)
|
||||
select substring_index(trim(' apple.orange.banana '), '.', 2)
|
||||
select substring_index(concat('apple', '.', 'orange', '.', 'banana'), '.', 2)
|
||||
select substring_index('apple.orange.banana', '.', length('apple'))
|
||||
select substring_index(upper('apple.orange.banana'), '.', 2)
|
||||
select substring_index(trim(' apple.orange.banana '), '.', 2)
|
||||
select name, substring_index(name, ' ', 1) from ts_4893.meters limit 1
|
||||
select var1, substring_index(var1, '-', -1) from ts_4893.meters limit 1
|
||||
select nch1, substring_index(nch1, ',', 3) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,91 +1,108 @@
|
|||
select TIMEDIFF(1,2);
|
||||
select TIMEDIFF(2,1);
|
||||
select TIMEDIFF(1,2,1s);
|
||||
select TIMEDIFF(2,1,1s);
|
||||
select TIMEDIFF(1,10000000,1m);
|
||||
select TIMEDIFF(10000000,1,1m);
|
||||
select TIMEDIFF(1,10000000,1h);
|
||||
select TIMEDIFF(10000000,1,1h);
|
||||
select TIMEDIFF(1,10000000,1d);
|
||||
select TIMEDIFF(10000000,1,1d);
|
||||
select TIMEDIFF(1,10000000,1w);
|
||||
select TIMEDIFF(10000000,1,1w);
|
||||
select TIMEDIFF(1724404450,1725095657);
|
||||
select TIMEDIFF(1725095657,1724404450);
|
||||
select TIMEDIFF(1724404450,1725095657,1s);
|
||||
select TIMEDIFF(1725095657,1724404450,1s);
|
||||
select TIMEDIFF(1724404450,1725095657,1m);
|
||||
select TIMEDIFF(1725095657,1724404450,1m);
|
||||
select TIMEDIFF(1724404450,1725095657,1h);
|
||||
select TIMEDIFF(1725095657,1724404450,1h);
|
||||
select TIMEDIFF(1724404450,1725095657,1d);
|
||||
select TIMEDIFF(1725095657,1724404450,1d);
|
||||
select TIMEDIFF(1724404450,1725095657,1w);
|
||||
select TIMEDIFF(1725095657,1724404450,1w);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17');
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17');
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s);
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m);
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h);
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d);
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w);
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657);
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17');
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1s);
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1s);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1m);
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1m);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1h);
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1h);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1d);
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1d);
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1w);
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1w);
|
||||
select TIMEDIFF(ts, ts) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17') from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1s) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1s) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1m) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1m) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1h) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1h) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1d) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1d) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1w) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1w) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, 1725095657) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(1725095657, ts) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, 1725095657, 1s) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(1725095657, ts, 1s) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, 1725095657, 1m) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(1725095657, ts, 1m) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, 1725095657, 1h) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(1725095657, ts, 1h) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, 1725095657, 1d) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(1725095657, ts, 1d) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(ts, 1725095657, 1w) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(1725095657, ts, 1w) from ts_4893.meters order by ts limit 10;
|
||||
select timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s);
|
||||
select timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s);
|
||||
select timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a);
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m);
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h);
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d);
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w);
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00');
|
||||
select timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s);
|
||||
select timediff('2022-01-31', '2022-01-01',1s);
|
||||
select timediff(1720769589, 1720769529, 1s);
|
||||
select timediff(1720769589123, 1720769529123, 1s);
|
||||
select timediff(1720769589, '2022-01-01 08:00:00', 1s);
|
||||
select timediff('2022-01-01 08:00:00', 1720769589, 1s);
|
||||
select timediff(1720769589231, '2022-01-01 08:00:00', 1s);
|
||||
select timediff('2022-01-01 08:00:00', 1720769589123, 1s);
|
||||
select timediff(ts, 1720769589123, 1a) from ts_4893.d0 order by ts limit 10;
|
||||
select timediff(ts, 1720769589123, 1a) from ts_4893.meters order by ts limit 10;
|
||||
select TIMEDIFF(1,2)
|
||||
select TIMEDIFF(2,1)
|
||||
select TIMEDIFF(1,2,1s)
|
||||
select TIMEDIFF(2,1,1s)
|
||||
select TIMEDIFF(1,10000000,1m)
|
||||
select TIMEDIFF(10000000,1,1m)
|
||||
select TIMEDIFF(1,10000000,1h)
|
||||
select TIMEDIFF(10000000,1,1h)
|
||||
select TIMEDIFF(1,10000000,1d)
|
||||
select TIMEDIFF(10000000,1,1d)
|
||||
select TIMEDIFF(1,10000000,1w)
|
||||
select TIMEDIFF(10000000,1,1w)
|
||||
select TIMEDIFF(1724404450,1725095657)
|
||||
select TIMEDIFF(1725095657,1724404450)
|
||||
select TIMEDIFF(1724404450,1725095657,1s)
|
||||
select TIMEDIFF(1725095657,1724404450,1s)
|
||||
select TIMEDIFF(1724404450,1725095657,1m)
|
||||
select TIMEDIFF(1725095657,1724404450,1m)
|
||||
select TIMEDIFF(1724404450,1725095657,1h)
|
||||
select TIMEDIFF(1725095657,1724404450,1h)
|
||||
select TIMEDIFF(1724404450,1725095657,1d)
|
||||
select TIMEDIFF(1725095657,1724404450,1d)
|
||||
select TIMEDIFF(1724404450,1725095657,1w)
|
||||
select TIMEDIFF(1725095657,1724404450,1w)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17')
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17')
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s)
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m)
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h)
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d)
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w)
|
||||
select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657)
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17')
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1s)
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1s)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1m)
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1m)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1h)
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1h)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1d)
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1d)
|
||||
select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1w)
|
||||
select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1w)
|
||||
select TIMEDIFF(ts, ts) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17') from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1s) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1s) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1m) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1m) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1h) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1h) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1d) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1d) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, '2024-08-31 17:14:17', 1w) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF('2024-08-31 17:14:17', ts, 1w) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, 1725095657) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(1725095657, ts) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, 1725095657, 1s) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(1725095657, ts, 1s) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, 1725095657, 1m) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(1725095657, ts, 1m) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, 1725095657, 1h) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(1725095657, ts, 1h) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, 1725095657, 1d) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(1725095657, ts, 1d) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(ts, 1725095657, 1w) from ts_4893.meters order by ts limit 10
|
||||
select TIMEDIFF(1725095657, ts, 1w) from ts_4893.meters order by ts limit 10
|
||||
select timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s)
|
||||
select timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s)
|
||||
select timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a)
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m)
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h)
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d)
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w)
|
||||
select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00')
|
||||
select timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s)
|
||||
select timediff('2022-01-31', '2022-01-01',1s)
|
||||
select timediff(1720769589, 1720769529, 1s)
|
||||
select timediff(1720769589, '2022-01-01 08:00:00', 1s)
|
||||
select timediff(1720769589123, 1720769529123, 1s)
|
||||
select timediff(1720769589231, '2022-01-01 08:00:00', 1s)
|
||||
select timediff('2022-01-01 08:00:00', 1720769589, 1s)
|
||||
select timediff('2022-01-01 08:00:00', 1720769589123, 1s)
|
||||
select timediff(ts, 1720769589123, 1a) from ts_4893.d0 order by ts limit 10
|
||||
select timediff(ts, 1720769589123, 1a) from ts_4893.meters order by ts limit 10
|
||||
select timediff(null, '2022-01-01 08:00:01', 1s)
|
||||
select timediff('20220131', '20220101', 1s)
|
||||
select timediff('01/31/22', '01/01/22', 1s)
|
||||
select timediff('22/01/31', '22/01/01')
|
||||
select timediff('22/01/31', '22/01/01', 1s)
|
||||
select timediff('31-JAN-22', '01-JAN-22', 1s)
|
||||
select timediff('2022/01/31', '2022/01/01', 1s)
|
||||
select timediff('2022-01-01 08:00:00', null, 1s)
|
||||
select timediff('www', 'ttt')
|
||||
select timediff(ts, ts) from ts_4893.meters limit 1
|
||||
select timediff(ts, ts - 1d) from ts_4893.meters limit 1
|
||||
select timediff(ts, '00:00:00') from ts_4893.meters limit 1
|
||||
select timediff(ts, null) from ts_4893.meters limit 1
|
||||
select timediff('25:61:61', ts) from ts_4893.meters limit 1
|
||||
select timediff('invalid_format', ts) from ts_4893.meters limit 1
|
||||
select timediff(name, ts) from ts_4893.meters limit 2
|
||||
select timediff('string_value', 'another_string') from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,125 +1,144 @@
|
|||
select trim('foo');
|
||||
select trim('foo' from 'foobarfoo');
|
||||
select trim(trailing 'foo' from 'foobarfoo');
|
||||
select trim(leading 'foo' from 'foobarfoo');
|
||||
select trim(both 'foo' from 'foobarfoo');
|
||||
select trim(' blank ');
|
||||
select trim(both ' ' from ' bla nk ');
|
||||
select trim(leading ' ' from ' bla nk');
|
||||
select trim(trailing ' ' from ' bla nk ');
|
||||
select trim(' ' from ' blank ');
|
||||
select TRIM(BOTH 'å' FROM 'aæaå');
|
||||
select trim(' 中文测试 ');
|
||||
select trim(both ' ' from ' 中文测试 ');
|
||||
select trim(leading ' ' from ' 中文测试');
|
||||
select trim(trailing ' ' from ' 中文测试 ');
|
||||
select trim(' ' from ' 中文测试 ');
|
||||
select trim('一' from '一二中文测试一');
|
||||
select trim(both '一' from '一二中文测试一');
|
||||
select trim(leading '一' from '一二中文测试一');
|
||||
select trim(trailing '一' from '一二中文测试一');
|
||||
select trim(' 中文andEnglish测试Test ');
|
||||
select trim(both ' ' from ' 中文andEnglish测试Test ');
|
||||
select trim(leading ' ' from ' 中文andEnglish测试Test');
|
||||
select trim(trailing ' ' from ' 中文andEnglish测试Test ');
|
||||
select trim('空格' from '空格中文andEngTes空格空格');
|
||||
select trim(both '空格' from '空格中文andEngTes空格空格');
|
||||
select trim(leading '空格' from '空格中文andEngTes空格空格');
|
||||
select trim(trailing '空格' from '空格中文andEngTes空格空格');
|
||||
select trim('blank' from 'blankblank中文andEnglish测试Tesblankblankblank');
|
||||
select trim(both 'blank' from 'blankblank中文andEnglish测试Tesblankblankblank');
|
||||
select trim(leading 'blank' from 'blankblank中文andEnglish测试Tesblankblankblank');
|
||||
select trim(trailing 'blank' from 'blankblank中文andEnglish测试Tesblankblankblank');
|
||||
select trim('空格blank' from '空格blank空格中Tes空格blank空');
|
||||
select trim(both '空格blank' from '空格blank空格中Tes空格blank空');
|
||||
select trim(leading '空格blank' from '空格blank空格中Tes空格blank空');
|
||||
select trim(trailing '空格blank' from '空格blank空格中Tes空格blank空');
|
||||
select trim(nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(both nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(leading nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(trailing nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(both nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(leading nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(trailing nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(both var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(leading var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(trailing var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5;
|
||||
select trim(var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(both var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(leading var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(trailing var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5;
|
||||
select trim(nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5;
|
||||
select trim(both nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5;
|
||||
select trim(leading nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5;
|
||||
select trim(trailing nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5;
|
||||
select trim(nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5;
|
||||
select trim(both nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5;
|
||||
select trim(leading nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5;
|
||||
select trim(trailing nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5;
|
||||
select trim(var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5;
|
||||
select trim(both var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5;
|
||||
select trim(leading var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5;
|
||||
select trim(trailing var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5;
|
||||
select trim(var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5;
|
||||
select trim(both var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5;
|
||||
select trim(leading var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5;
|
||||
select trim(trailing var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5;
|
||||
select trim('一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5;
|
||||
select trim(both '一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5;
|
||||
select trim(leading '一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5;
|
||||
select trim(trailing '一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5;
|
||||
select trim('一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5;
|
||||
select trim(both '一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5;
|
||||
select trim(leading '一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5;
|
||||
select trim(trailing '一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5;
|
||||
select trim('一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5;
|
||||
select trim(both '一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5;
|
||||
select trim(leading '一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5;
|
||||
select trim(trailing '一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5;
|
||||
select trim('一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5;
|
||||
select trim(both '一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5;
|
||||
select trim(leading '一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5;
|
||||
select trim(trailing '一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5;
|
||||
select trim(nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(both nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(leading nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(trailing nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(both nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(leading nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(trailing nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(both var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(leading var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(trailing var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5;
|
||||
select trim(var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(both var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(leading var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(trailing var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5;
|
||||
select trim(' A ');
|
||||
select trim(' 涛思 ');
|
||||
select trim('a' FROM 'aaab bbba');
|
||||
select trim(LEADING FROM ' aaa ');
|
||||
select trim(LEADING 'a' FROM ' aaa abab aaaa ');
|
||||
select trim(LEADING 'a' FROM 'aaa abab aaaa ');
|
||||
select trim(LEADING '北' FROM '北京涛思数据科技有限公司北');
|
||||
select trim(LEADING '北' FROM '北bei京涛思数据科技有限公司北');
|
||||
select trim(TRAILING FROM ' aaa abab aaaa ');
|
||||
select trim(TRAILING 'a' FROM 'aaa abab aaaa');
|
||||
select trim(TRAILING 'a' FROM ' aaa abab aaaa');
|
||||
select trim(TRAILING '北' FROM '北京涛思数据科技有限公司北') as sub;
|
||||
select trim(TRAILING '北' FROM '北京涛思数据科技有限公司bei北');
|
||||
select trim(BOTH FROM ' aaa abab aaaa ');
|
||||
select trim(BOTH 'a' FROM ' aaa abab aaaa ');
|
||||
select trim(BOTH 'a' FROM 'aaa abab aaaa');
|
||||
select trim(BOTH '北' FROM '北京涛思数据科技有限公司北');
|
||||
select trim(nch2 from nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select trim(nch2 from nch1) from ts_4893.meters order by ts limit 10;
|
||||
select trim(nch2 from var1) from ts_4893.d0 order by ts limit 10;
|
||||
select trim(nch2 from var1) from ts_4893.meters order by ts limit 10;
|
||||
select trim(var2 from nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select trim(var2 from nch1) from ts_4893.meters order by ts limit 10;
|
||||
select trim(var2 from var1) from ts_4893.d0 order by ts limit 10;
|
||||
select trim(var2 from var1) from ts_4893.meters order by ts limit 10;
|
||||
select trim('foo')
|
||||
select trim('foo' from 'foobarfoo')
|
||||
select trim(trailing 'foo' from 'foobarfoo')
|
||||
select trim(leading 'foo' from 'foobarfoo')
|
||||
select trim(both 'foo' from 'foobarfoo')
|
||||
select trim(' blank ')
|
||||
select trim(both ' ' from ' bla nk ')
|
||||
select trim(leading ' ' from ' bla nk')
|
||||
select trim(trailing ' ' from ' bla nk ')
|
||||
select trim(' ' from ' blank ')
|
||||
select TRIM(BOTH 'å' FROM 'aæaå')
|
||||
select trim(' 中文测试 ')
|
||||
select trim(both ' ' from ' 中文测试 ')
|
||||
select trim(leading ' ' from ' 中文测试')
|
||||
select trim(trailing ' ' from ' 中文测试 ')
|
||||
select trim(' ' from ' 中文测试 ')
|
||||
select trim('一' from '一二中文测试一')
|
||||
select trim(both '一' from '一二中文测试一')
|
||||
select trim(leading '一' from '一二中文测试一')
|
||||
select trim(trailing '一' from '一二中文测试一')
|
||||
select trim(' 中文andEnglish测试Test ')
|
||||
select trim(both ' ' from ' 中文andEnglish测试Test ')
|
||||
select trim(leading ' ' from ' 中文andEnglish测试Test')
|
||||
select trim(trailing ' ' from ' 中文andEnglish测试Test ')
|
||||
select trim('空格' from '空格中文andEngTes空格空格')
|
||||
select trim(both '空格' from '空格中文andEngTes空格空格')
|
||||
select trim(leading '空格' from '空格中文andEngTes空格空格')
|
||||
select trim(trailing '空格' from '空格中文andEngTes空格空格')
|
||||
select trim('blank' from 'blankblank中文andEnglish测试Tesblankblankblank')
|
||||
select trim(both 'blank' from 'blankblank中文andEnglish测试Tesblankblankblank')
|
||||
select trim(leading 'blank' from 'blankblank中文andEnglish测试Tesblankblankblank')
|
||||
select trim(trailing 'blank' from 'blankblank中文andEnglish测试Tesblankblankblank')
|
||||
select trim('空格blank' from '空格blank空格中Tes空格blank空')
|
||||
select trim(both '空格blank' from '空格blank空格中Tes空格blank空')
|
||||
select trim(leading '空格blank' from '空格blank空格中Tes空格blank空')
|
||||
select trim(trailing '空格blank' from '空格blank空格中Tes空格blank空')
|
||||
select trim(nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5
|
||||
select trim(both nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5
|
||||
select trim(leading nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5
|
||||
select trim(trailing nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5
|
||||
select trim(nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
select trim(both nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
select trim(leading nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
select trim(trailing nch2 from nch1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
select trim(var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5
|
||||
select trim(both var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5
|
||||
select trim(leading var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5
|
||||
select trim(trailing var2 from nch1) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5
|
||||
select trim(var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
select trim(both var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
select trim(leading var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
select trim(trailing var2 from nch1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
select trim(nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5
|
||||
select trim(both nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5
|
||||
select trim(leading nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5
|
||||
select trim(trailing nch2 from var1) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5
|
||||
select trim(nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
select trim(both nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
select trim(leading nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
select trim(trailing nch2 from var1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
select trim(var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5
|
||||
select trim(both var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5
|
||||
select trim(leading var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5
|
||||
select trim(trailing var2 from var1) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5
|
||||
select trim(var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
select trim(both var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
select trim(leading var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
select trim(trailing var2 from var1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
select trim('一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5
|
||||
select trim(both '一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5
|
||||
select trim(leading '一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5
|
||||
select trim(trailing '一' from nch1) from ts_4893.meters where position('一' in nch1) != 0 order by ts limit 5
|
||||
select trim('一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5
|
||||
select trim(both '一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5
|
||||
select trim(leading '一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5
|
||||
select trim(trailing '一' from nch1) from ts_4893.meters where position('一' in nch1) = 0 order by ts limit 5
|
||||
select trim('一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5
|
||||
select trim(both '一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5
|
||||
select trim(leading '一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5
|
||||
select trim(trailing '一' from var1) from ts_4893.meters where position('一' in var1) != 0 order by ts limit 5
|
||||
select trim('一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5
|
||||
select trim(both '一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5
|
||||
select trim(leading '一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5
|
||||
select trim(trailing '一' from var1) from ts_4893.meters where position('一' in var1) = 0 order by ts limit 5
|
||||
select trim(nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(both nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(leading nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(trailing nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(both nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(leading nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(trailing nch2 from '三abbcfp三a') from ts_4893.meters where position(nch2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(both var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(leading var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(trailing var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') != 0 order by ts limit 5
|
||||
select trim(var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(both var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(leading var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(trailing var2 from '三abbcfp三a') from ts_4893.meters where position(var2 in '三abbcfp三a') = 0 order by ts limit 5
|
||||
select trim(' A ')
|
||||
select trim(' 涛思 ')
|
||||
select trim('a' FROM 'aaab bbba')
|
||||
select trim(LEADING FROM ' aaa ')
|
||||
select trim(LEADING 'a' FROM ' aaa abab aaaa ')
|
||||
select trim(LEADING 'a' FROM 'aaa abab aaaa ')
|
||||
select trim(LEADING '北' FROM '北京涛思数据科技有限公司北')
|
||||
select trim(LEADING '北' FROM '北bei京涛思数据科技有限公司北')
|
||||
select trim(TRAILING FROM ' aaa abab aaaa ')
|
||||
select trim(TRAILING 'a' FROM 'aaa abab aaaa')
|
||||
select trim(TRAILING 'a' FROM ' aaa abab aaaa')
|
||||
select trim(TRAILING '北' FROM '北京涛思数据科技有限公司北') as sub
|
||||
select trim(TRAILING '北' FROM '北京涛思数据科技有限公司bei北')
|
||||
select trim(BOTH FROM ' aaa abab aaaa ')
|
||||
select trim(BOTH 'a' FROM ' aaa abab aaaa ')
|
||||
select trim(BOTH 'a' FROM 'aaa abab aaaa')
|
||||
select trim(BOTH '北' FROM '北京涛思数据科技有限公司北')
|
||||
select trim(nch2 from nch1) from ts_4893.d0 order by ts limit 10
|
||||
select trim(nch2 from nch1) from ts_4893.meters order by ts limit 10
|
||||
select trim(nch2 from var1) from ts_4893.d0 order by ts limit 10
|
||||
select trim(nch2 from var1) from ts_4893.meters order by ts limit 10
|
||||
select trim(var2 from nch1) from ts_4893.d0 order by ts limit 10
|
||||
select trim(var2 from nch1) from ts_4893.meters order by ts limit 10
|
||||
select trim(var2 from var1) from ts_4893.d0 order by ts limit 10
|
||||
select trim(var2 from var1) from ts_4893.meters order by ts limit 10
|
||||
select trim(null)
|
||||
select trim('')
|
||||
select trim(leading ' ' from ' hello')
|
||||
select trim(trailing ' ' from 'hello ')
|
||||
select trim('0' from '000123000')
|
||||
select trim(' hello ')
|
||||
select trim(' apple banana ')
|
||||
select var2, trim('*' from var2) from ts_4893.meters limit 1
|
||||
select trim('x' from 'hello')
|
||||
select trim('longer' from 'short')
|
||||
select trim('hello')
|
||||
select trim(' 12345 ')
|
||||
select trim(concat(' hello', ' world '))
|
||||
select trim(upper(' hello world '))
|
||||
select trim(substring(' hello world ', 4))
|
||||
select trim(replace(' hello world ', ' ', '-'))
|
||||
select name, trim(name) from ts_4893.meters limit 1
|
||||
select var1, trim(trailing '!' from var1) from ts_4893.meters limit 1
|
||||
select nch1, trim(leading '-' from nch1) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,37 +1,54 @@
|
|||
select TRUNCATE(10.55, 3);
|
||||
select TRUNCATE(10.55, 2);
|
||||
select TRUNCATE(10.55, 1);
|
||||
select TRUNCATE(10.55, 0);
|
||||
select TRUNCATE(10.55, -1);
|
||||
select TRUNCATE(10.55, -10);
|
||||
select TRUNCATE(-10.55, 1);
|
||||
select TRUNCATE(99, 1);
|
||||
select TRUNCATE(10.55, 1) + 1;
|
||||
select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123.123456789, 9), 8), 7), 6), 5), 4), 3);
|
||||
select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123456789.123456789, -1), -2), -3), -4), -5), -6), -7);
|
||||
select TRUNCATE(87654321.123456789, id) from ts_4893.meters order by ts limit 10;
|
||||
select TRUNCATE(current, id) from ts_4893.meters order by ts limit 10;
|
||||
select TRUNCATE(current, 1) from ts_4893.meters order by ts limit 10;
|
||||
select TRUNC(10.55, 3);
|
||||
select TRUNC(10.55, 2);
|
||||
select TRUNC(10.55, 1);
|
||||
select TRUNC(10.55, 0);
|
||||
select TRUNC(10.55, -1);
|
||||
select TRUNC(10.55, -10);
|
||||
select TRUNC(-10.55, 1);
|
||||
select TRUNC(99, 1);
|
||||
select TRUNC(10.55, 1) + 1;
|
||||
select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123.123456789, 9), 8), 7), 6), 5), 4), 3);
|
||||
select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123456789.123456789, -1), -2), -3), -4), -5), -6), -7);
|
||||
select TRUNC(87654321.123456789, id) from ts_4893.meters order by ts limit 10;
|
||||
select TRUNC(current, id) from ts_4893.meters order by ts limit 10;
|
||||
select TRUNC(current, 1) from ts_4893.meters order by ts limit 10;
|
||||
select truncate(99.99, 3);
|
||||
select truncate(99.99, 2);
|
||||
select truncate(99.99, 1);
|
||||
select truncate(99.99, 0);
|
||||
select truncate(99.99, -1);
|
||||
select truncate(99.99, -10);
|
||||
select truncate(99, 1);
|
||||
select truncate(current, 1) from ts_4893.d0 order by ts limit 10;
|
||||
select truncate(current, 1) from ts_4893.meters order by ts limit 10;
|
||||
select TRUNCATE(10.55, 3)
|
||||
select TRUNCATE(10.55, 2)
|
||||
select TRUNCATE(10.55, 1)
|
||||
select TRUNCATE(10.55, 0)
|
||||
select TRUNCATE(10.55, -1)
|
||||
select TRUNCATE(10.55, -10)
|
||||
select TRUNCATE(-10.55, 1)
|
||||
select TRUNCATE(99, 1)
|
||||
select TRUNCATE(10.55, 1) + 1
|
||||
select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123.123456789, 9), 8), 7), 6), 5), 4), 3)
|
||||
select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
|
||||
select TRUNCATE(87654321.123456789, id) from ts_4893.meters order by ts limit 10
|
||||
select TRUNCATE(current, id) from ts_4893.meters order by ts limit 10
|
||||
select TRUNCATE(current, 1) from ts_4893.meters order by ts limit 10
|
||||
select TRUNC(10.55, 3)
|
||||
select TRUNC(10.55, 2)
|
||||
select TRUNC(10.55, 1)
|
||||
select TRUNC(10.55, 0)
|
||||
select TRUNC(10.55, -1)
|
||||
select TRUNC(10.55, -10)
|
||||
select TRUNC(-10.55, 1)
|
||||
select TRUNC(99, 1)
|
||||
select TRUNC(10.55, 1) + 1
|
||||
select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123.123456789, 9), 8), 7), 6), 5), 4), 3)
|
||||
select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123456789.123456789, -1), -2), -3), -4), -5), -6), -7)
|
||||
select TRUNC(87654321.123456789, id) from ts_4893.meters order by ts limit 10
|
||||
select TRUNC(current, id) from ts_4893.meters order by ts limit 10
|
||||
select TRUNC(current, 1) from ts_4893.meters order by ts limit 10
|
||||
select truncate(99.99, 3)
|
||||
select truncate(99.99, 2)
|
||||
select truncate(99.99, 1)
|
||||
select truncate(99.99, 0)
|
||||
select truncate(99.99, -1)
|
||||
select truncate(99.99, -10)
|
||||
select truncate(99, 1)
|
||||
select truncate(current, 1) from ts_4893.d0 order by ts limit 10
|
||||
select truncate(current, 1) from ts_4893.meters order by ts limit 10
|
||||
select truncate(99.99, null)
|
||||
select truncate(null, 3)
|
||||
select truncate(1.0001, 3)
|
||||
select truncate(2.71828, 4)
|
||||
select truncate(3.14159, 2)
|
||||
select truncate(100.9876, 2)
|
||||
select truncate(99999999999999.9999, 2)
|
||||
select truncate(-5.678, 2)
|
||||
select truncate(voltage, 2) from ts_4893.meters limit 1
|
||||
select truncate(current, 1) from ts_4893.meters limit 1
|
||||
select truncate(phase, 3) from ts_4893.meters limit 1
|
||||
select truncate(voltage + current, 2) from ts_4893.meters limit 1
|
||||
select truncate(voltage, -1) from ts_4893.meters limit 1
|
||||
select round(truncate(voltage, 1), 2) from ts_4893.meters limit 1
|
||||
select truncate(abs(current), 1) from ts_4893.meters limit 1
|
||||
select truncate(exp(phase), 2) from ts_4893.meters limit 1
|
||||
select truncate(log(current), 1) from ts_4893.meters limit 1
|
||||
|
|
|
@ -1,10 +1,20 @@
|
|||
select VAR_POP(current) from ts_4893.meters;
|
||||
select VAR_POP(current) from ts_4893.meters interval(1d) order by 1 limit 10;
|
||||
select VAR_POP(id) from ts_4893.meters;
|
||||
select VAR_POP(id) from ts_4893.meters interval(1d) limit 10;
|
||||
select VAR_POP(id) from ts_4893.meters where id > 100;
|
||||
select VAR_POP(id) from ts_4893.meters interval(1d) order by 1 limit 10;
|
||||
select var_pop(id) from ts_4893.d0;
|
||||
select var_pop(id) from ts_4893.meters;
|
||||
select var_pop(current) from ts_4893.d0;
|
||||
select var_pop(current) from ts_4893.meters;
|
||||
select VAR_POP(current) from ts_4893.meters
|
||||
select VAR_POP(current) from ts_4893.meters interval(1d) order by 1 limit 10
|
||||
select VAR_POP(id) from ts_4893.meters
|
||||
select VAR_POP(id) from ts_4893.meters interval(1d) limit 10
|
||||
select VAR_POP(id) from ts_4893.meters where id > 100
|
||||
select VAR_POP(id) from ts_4893.meters interval(1d) order by 1 limit 10
|
||||
select var_pop(null) from ts_4893.meters
|
||||
select var_pop(id) from ts_4893.d0
|
||||
select var_pop(current) from ts_4893.d0
|
||||
select var_pop(voltage) from ts_4893.meters
|
||||
select var_pop(voltage) from ts_4893.meters where voltage is not null
|
||||
select var_pop(phase) from ts_4893.meters
|
||||
select var_pop(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
|
||||
select var_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
|
||||
select round(var_pop(current), 2) from ts_4893.meters
|
||||
select pow(var_pop(current), 2) from ts_4893.meters
|
||||
select log(var_pop(voltage) + 1) from ts_4893.meters
|
||||
select groupid, var_pop(voltage) from ts_4893.meters group by groupid order by groupid
|
||||
select location, var_pop(current) from ts_4893.meters group by location order by location
|
||||
select location, var_pop(voltage) from ts_4893.meters group by location order by location
|
||||
|
|
|
@ -1,75 +1,93 @@
|
|||
select WEEK('2020-01-01 00:00:00');
|
||||
select WEEK('2020-01-01 00:00:00', 0);
|
||||
select WEEK('2020-01-01 00:00:00', 1);
|
||||
select WEEK('2020-01-01 00:00:00', 2);
|
||||
select WEEK('2020-01-01 00:00:00', 3);
|
||||
select WEEK('2020-01-01 00:00:00', 4);
|
||||
select WEEK('2020-01-01 00:00:00', 5);
|
||||
select WEEK('2020-01-01 00:00:00', 6);
|
||||
select WEEK('2020-01-01 00:00:00', 7);
|
||||
select WEEK('2021-01-01 00:00:00');
|
||||
select WEEK('2021-01-01 00:00:00', 0);
|
||||
select WEEK('2021-01-01 00:00:00', 1);
|
||||
select WEEK('2021-01-01 00:00:00', 2);
|
||||
select WEEK('2021-01-01 00:00:00', 3);
|
||||
select WEEK('2021-01-01 00:00:00', 4);
|
||||
select WEEK('2021-01-01 00:00:00', 5);
|
||||
select WEEK('2021-01-01 00:00:00', 6);
|
||||
select WEEK('2021-01-01 00:00:00', 7);
|
||||
select WEEK('1998-01-01 00:00:00');
|
||||
select WEEK('1998-01-01 00:00:00', 0);
|
||||
select WEEK('1998-01-01 00:00:00', 1);
|
||||
select WEEK('1998-01-01 00:00:00', 2);
|
||||
select WEEK('1998-01-01 00:00:00', 3);
|
||||
select WEEK('1998-01-01 00:00:00', 4);
|
||||
select WEEK('1998-01-01 00:00:00', 5);
|
||||
select WEEK('1998-01-01 00:00:00', 6);
|
||||
select WEEK('1998-01-01 00:00:00', 7);
|
||||
select WEEK('1998-12-31 00:00:00');
|
||||
select WEEK('1998-12-31 00:00:00', 0);
|
||||
select WEEK('1998-12-31 00:00:00', 1);
|
||||
select WEEK('1998-12-31 00:00:00', 2);
|
||||
select WEEK('1998-12-31 00:00:00', 3);
|
||||
select WEEK('1998-12-31 00:00:00', 4);
|
||||
select WEEK('1998-12-31 00:00:00', 5);
|
||||
select WEEK('1998-12-31 00:00:00', 6);
|
||||
select WEEK('1998-12-31 00:00:00', 7);
|
||||
select WEEK('2000-01-06 00:00:00');
|
||||
select WEEK('2000-01-06 00:00:00', 0);
|
||||
select WEEK('2000-01-06 00:00:00', 1);
|
||||
select WEEK('2000-01-06 00:00:00', 2);
|
||||
select WEEK('2000-01-06 00:00:00', 3);
|
||||
select WEEK('2000-01-06 00:00:00', 4);
|
||||
select WEEK('2000-01-06 00:00:00', 5);
|
||||
select WEEK('2000-01-06 00:00:00', 6);
|
||||
select WEEK('2000-01-06 00:00:00', 7);
|
||||
select WEEK(1725095657);
|
||||
select WEEK(1725095657, 0);
|
||||
select WEEK(1725095657, 1);
|
||||
select WEEK(1725095657, 2);
|
||||
select WEEK(1725095657, 3);
|
||||
select WEEK(1725095657, 4);
|
||||
select WEEK(1725095657, 5);
|
||||
select WEEK(1725095657, 6);
|
||||
select WEEK(ts) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 0) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 1) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 2) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 3) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 4) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 5) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 6) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK(ts, 7) from ts_4893.meters order by ts limit 10;
|
||||
select week(123);
|
||||
select week('2000-01-01',0);
|
||||
select week('2000-01-01',1);
|
||||
select week('2000-01-01',2);
|
||||
select week('2000-01-01',3);
|
||||
select week('2000-01-01',4);
|
||||
select week('2000-01-01',5);
|
||||
select week('2000-01-01',6);
|
||||
select week('2000-01-01',7);
|
||||
select week(1721020591,0);
|
||||
select week('2020-01-01 00:00:00', 2);
|
||||
select week(ts) from ts_4893.d0 order by ts limit 10;
|
||||
select week(ts) from ts_4893.meters order by ts limit 10;
|
||||
select WEEK('2020-01-01 00:00:00')
|
||||
select WEEK('2020-01-01 00:00:00', 0)
|
||||
select WEEK('2020-01-01 00:00:00', 1)
|
||||
select WEEK('2020-01-01 00:00:00', 2)
|
||||
select WEEK('2020-01-01 00:00:00', 3)
|
||||
select WEEK('2020-01-01 00:00:00', 4)
|
||||
select WEEK('2020-01-01 00:00:00', 5)
|
||||
select WEEK('2020-01-01 00:00:00', 6)
|
||||
select WEEK('2020-01-01 00:00:00', 7)
|
||||
select WEEK('2021-01-01 00:00:00')
|
||||
select WEEK('2021-01-01 00:00:00', 0)
|
||||
select WEEK('2021-01-01 00:00:00', 1)
|
||||
select WEEK('2021-01-01 00:00:00', 2)
|
||||
select WEEK('2021-01-01 00:00:00', 3)
|
||||
select WEEK('2021-01-01 00:00:00', 4)
|
||||
select WEEK('2021-01-01 00:00:00', 5)
|
||||
select WEEK('2021-01-01 00:00:00', 6)
|
||||
select WEEK('2021-01-01 00:00:00', 7)
|
||||
select WEEK('1998-01-01 00:00:00')
|
||||
select WEEK('1998-01-01 00:00:00', 0)
|
||||
select WEEK('1998-01-01 00:00:00', 1)
|
||||
select WEEK('1998-01-01 00:00:00', 2)
|
||||
select WEEK('1998-01-01 00:00:00', 3)
|
||||
select WEEK('1998-01-01 00:00:00', 4)
|
||||
select WEEK('1998-01-01 00:00:00', 5)
|
||||
select WEEK('1998-01-01 00:00:00', 6)
|
||||
select WEEK('1998-01-01 00:00:00', 7)
|
||||
select WEEK('1998-12-31 00:00:00')
|
||||
select WEEK('1998-12-31 00:00:00', 0)
|
||||
select WEEK('1998-12-31 00:00:00', 1)
|
||||
select WEEK('1998-12-31 00:00:00', 2)
|
||||
select WEEK('1998-12-31 00:00:00', 3)
|
||||
select WEEK('1998-12-31 00:00:00', 4)
|
||||
select WEEK('1998-12-31 00:00:00', 5)
|
||||
select WEEK('1998-12-31 00:00:00', 6)
|
||||
select WEEK('1998-12-31 00:00:00', 7)
|
||||
select WEEK('2000-01-06 00:00:00')
|
||||
select WEEK('2000-01-06 00:00:00', 0)
|
||||
select WEEK('2000-01-06 00:00:00', 1)
|
||||
select WEEK('2000-01-06 00:00:00', 2)
|
||||
select WEEK('2000-01-06 00:00:00', 3)
|
||||
select WEEK('2000-01-06 00:00:00', 4)
|
||||
select WEEK('2000-01-06 00:00:00', 5)
|
||||
select WEEK('2000-01-06 00:00:00', 6)
|
||||
select WEEK('2000-01-06 00:00:00', 7)
|
||||
select WEEK(1725095657)
|
||||
select WEEK(1725095657, 0)
|
||||
select WEEK(1725095657, 1)
|
||||
select WEEK(1725095657, 2)
|
||||
select WEEK(1725095657, 3)
|
||||
select WEEK(1725095657, 4)
|
||||
select WEEK(1725095657, 5)
|
||||
select WEEK(1725095657, 6)
|
||||
select WEEK(ts) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 0) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 1) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 2) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 3) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 4) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 5) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 6) from ts_4893.meters order by ts limit 10
|
||||
select WEEK(ts, 7) from ts_4893.meters order by ts limit 10
|
||||
select week(123)
|
||||
select week('2000-01-01',0)
|
||||
select week('2000-01-01',1)
|
||||
select week('2000-01-01',2)
|
||||
select week('2000-01-01',3)
|
||||
select week('2000-01-01',4)
|
||||
select week('2000-01-01',5)
|
||||
select week('2000-01-01',6)
|
||||
select week('2000-01-01',7)
|
||||
select week(1721020591,0)
|
||||
select week('2020-01-01 00:00:00', 2)
|
||||
select week(ts) from ts_4893.d0 order by ts limit 10
|
||||
select week(ts) from ts_4893.meters order by ts limit 10
|
||||
select week(null, 0)
|
||||
select week('abc')
|
||||
select week('1721020591', 0)
|
||||
select week('1721020666229', 0)
|
||||
select week('20200101', 2)
|
||||
select week('11/01/31', 2)
|
||||
select week('20/01/01', 2)
|
||||
select week('01/01/2020', 2)
|
||||
select week('01-JAN-20', 2)
|
||||
select week('2023-09-25')
|
||||
select week('9999-12-31')
|
||||
select week('2024-02-29 00:00:00')
|
||||
select week(ts) from ts_4893.meters limit 1
|
||||
select week(name) from ts_4893.meters limit 1
|
||||
select week(ts), dayofweek(ts) from ts_4893.meters limit 1
|
||||
select week(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
|
||||
select id, week(ts) from ts_4893.meters where id = 1 limit 1
|
||||
select groupid, sum(week(ts)) from ts_4893.meters group by groupid order by groupid
|
||||
|
|
|
@ -1,19 +1,38 @@
|
|||
select WEEKDAY('2020-01-01 00:00:00');
|
||||
select WEEKDAY('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKDAY('2021-01-01 00:00:00');
|
||||
select WEEKDAY('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKDAY('1998-01-01 00:00:00');
|
||||
select WEEKDAY('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKDAY('1998-12-31 00:00:00');
|
||||
select WEEKDAY('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKDAY('2000-01-06 00:00:00');
|
||||
select WEEKDAY('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKDAY(1725095657);
|
||||
select WEEKDAY(1725095657) from ts_4893.meters order by ts limit 10;
|
||||
select WEEKDAY(ts) from ts_4893.meters order by ts limit 10;
|
||||
select weekday('2020-01-01');
|
||||
select weekday(1721020591);
|
||||
select weekday(1721020666229);
|
||||
select weekday('2020-01-01 00:00:00');
|
||||
select weekday(ts) from ts_4893.d0 order by ts limit 10;
|
||||
select weekday(ts) from ts_4893.meters order by ts limit 10;
|
||||
select WEEKDAY('2020-01-01 00:00:00')
|
||||
select WEEKDAY('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKDAY('2021-01-01 00:00:00')
|
||||
select WEEKDAY('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKDAY('1998-01-01 00:00:00')
|
||||
select WEEKDAY('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKDAY('1998-12-31 00:00:00')
|
||||
select WEEKDAY('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKDAY('2000-01-06 00:00:00')
|
||||
select WEEKDAY('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKDAY(1725095657)
|
||||
select WEEKDAY(1725095657) from ts_4893.meters order by ts limit 10
|
||||
select WEEKDAY(ts) from ts_4893.meters order by ts limit 10
|
||||
select weekday('2020-01-01')
|
||||
select weekday(1721020591)
|
||||
select weekday(1721020666229)
|
||||
select weekday('2020-01-01 00:00:00')
|
||||
select weekday(ts) from ts_4893.d0 order by ts limit 10
|
||||
select weekday(ts) from ts_4893.meters order by ts limit 10
|
||||
select weekday(null)
|
||||
select weekday('abc')
|
||||
select weekday('1721020591')
|
||||
select weekday('1721020666229')
|
||||
select weekday('01/01/2020')
|
||||
select weekday('20200101')
|
||||
select weekday('20/01/01')
|
||||
select weekday('11/01/32')
|
||||
select weekday('01-JAN-20')
|
||||
select weekday('2024-02-29')
|
||||
select weekday('2023-09-24')
|
||||
select weekday('2023-09-25')
|
||||
select weekday('9999-12-31')
|
||||
select weekday(name) from ts_4893.meters limit 1
|
||||
select weekday(ts), dayofweek(ts) from ts_4893.meters limit 1
|
||||
select weekday(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
|
||||
select weekday(ts) from ts_4893.meters limit 1
|
||||
select id, weekday(ts) from ts_4893.meters where id = 1 limit 1
|
||||
select groupid, sum(weekday(ts)) from ts_4893.meters group by groupid order by groupid
|
||||
|
|
|
@ -1,18 +1,37 @@
|
|||
select WEEKOFYEAR('2020-01-01 00:00:00');
|
||||
select WEEKOFYEAR('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKOFYEAR('2021-01-01 00:00:00');
|
||||
select WEEKOFYEAR('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKOFYEAR('1998-01-01 00:00:00');
|
||||
select WEEKOFYEAR('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKOFYEAR('1998-12-31 00:00:00');
|
||||
select WEEKOFYEAR('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKOFYEAR('2000-01-06 00:00:00');
|
||||
select WEEKOFYEAR('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select WEEKOFYEAR(1725095657);
|
||||
select WEEKOFYEAR(1725095657) from ts_4893.meters order by ts limit 10;
|
||||
select WEEKOFYEAR(ts) from ts_4893.meters order by ts limit 10;
|
||||
select weekofyear('2020-01-01');
|
||||
select weekofyear(1721020666);
|
||||
select weekofyear(1721020666229);
|
||||
select weekofyear(ts) from ts_4893.d0 order by ts limit 10;
|
||||
select weekofyear(ts) from ts_4893.meters order by ts limit 10;
|
||||
select WEEKOFYEAR('2020-01-01 00:00:00')
|
||||
select WEEKOFYEAR('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKOFYEAR('2021-01-01 00:00:00')
|
||||
select WEEKOFYEAR('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKOFYEAR('1998-01-01 00:00:00')
|
||||
select WEEKOFYEAR('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKOFYEAR('1998-12-31 00:00:00')
|
||||
select WEEKOFYEAR('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKOFYEAR('2000-01-06 00:00:00')
|
||||
select WEEKOFYEAR('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10
|
||||
select WEEKOFYEAR(1725095657)
|
||||
select WEEKOFYEAR(1725095657) from ts_4893.meters order by ts limit 10
|
||||
select WEEKOFYEAR(ts) from ts_4893.meters order by ts limit 10
|
||||
select weekofyear('2020-01-01')
|
||||
select weekofyear(1721020666)
|
||||
select weekofyear(1721020666229)
|
||||
select weekofyear(ts) from ts_4893.d0 order by ts limit 10
|
||||
select weekofyear(ts) from ts_4893.meters order by ts limit 10
|
||||
select weekofyear(null)
|
||||
select weekofyear('1721020591')
|
||||
select weekofyear('1721020666229')
|
||||
select weekofyear('abc')
|
||||
select weekofyear('01/01/2020')
|
||||
select weekofyear('20200101')
|
||||
select weekofyear('20/01/01')
|
||||
select weekofyear('11/01/31')
|
||||
select weekofyear('01-JAN-20')
|
||||
select weekofyear('2024-02-29')
|
||||
select weekofyear('2024-01-01')
|
||||
select weekofyear('2024-12-31')
|
||||
select weekofyear('9999-12-31')
|
||||
select weekofyear(name) from ts_4893.meters limit 1
|
||||
select weekofyear(ts) from ts_4893.meters limit 1
|
||||
select weekofyear(ts), dayofweek(ts) from ts_4893.meters limit 1
|
||||
select weekofyear(timediff(ts, '2024-10-10 09:36:50.172')) from ts_4893.meters limit 1
|
||||
select id, weekofyear(ts) from ts_4893.meters where id = 1 limit 1
|
||||
select groupid, sum(weekofyear(ts)) from ts_4893.meters group by groupid order by groupid
|
||||
|
|
|
@ -11,20 +11,12 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import time
|
||||
import random
|
||||
|
||||
import taos
|
||||
import frame
|
||||
|
||||
from frame import etool
|
||||
from frame.etool import *
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
|
||||
from frame import etool
|
||||
from frame.common import *
|
||||
|
||||
class TDTestCase(TBase):
|
||||
|
@ -36,17 +28,16 @@ class TDTestCase(TBase):
|
|||
"queryBufferSize": 10240
|
||||
}
|
||||
|
||||
def insertData(self):
|
||||
def insert_data(self):
|
||||
tdLog.info(f"insert data.")
|
||||
# taosBenchmark run
|
||||
datafile = etool.curFile(__file__, "data/d1001.data")
|
||||
|
||||
tdSql.execute("create database ts_4893;")
|
||||
tdSql.execute(f"use ts_4893;")
|
||||
tdSql.execute("use ts_4893;")
|
||||
tdSql.execute("select database();")
|
||||
tdSql.execute("CREATE STABLE `meters` (`ts` TIMESTAMP, `current` FLOAT, `voltage` INT, `phase` FLOAT, "
|
||||
"`id` INT, `name` VARCHAR(64), `nch1` NCHAR(50), `nch2` NCHAR(50), `var1` VARCHAR(50), "
|
||||
"`var2` VARCHAR(50)) TAGS (`groupid` TINYINT, `location` VARCHAR(16));")
|
||||
"`id` INT, `name` VARCHAR(64), `nch1` NCHAR(50), `nch2` NCHAR(50), `var1` VARCHAR(50), "
|
||||
"`var2` VARCHAR(50)) TAGS (`groupid` TINYINT, `location` VARCHAR(16));")
|
||||
tdSql.execute("CREATE table d0 using meters tags(1, 'beijing')")
|
||||
tdSql.execute("insert into d0 file '%s'" % datafile)
|
||||
|
||||
|
@ -63,12 +54,9 @@ class TDTestCase(TBase):
|
|||
continue
|
||||
|
||||
sql_statement += line.strip()
|
||||
|
||||
if sql_statement.endswith(';'):
|
||||
# 去掉末尾的分号
|
||||
sql_statement = sql_statement.rstrip(';')
|
||||
tdSql.checkDataCsvByLine(sql_statement, ansFile)
|
||||
# 清空 sql_statement 以便处理下一条语句
|
||||
sql_statement = ''
|
||||
err_file_path = etool.curFile(__file__, f"in/{testCase}.err")
|
||||
if not os.path.isfile(err_file_path):
|
||||
|
@ -80,16 +68,15 @@ class TDTestCase(TBase):
|
|||
continue
|
||||
|
||||
err_statement += line.strip()
|
||||
|
||||
if err_statement.endswith(';'):
|
||||
tdSql.error(err_statement)
|
||||
err_statement = ''
|
||||
|
||||
def test_normal_query_new(self, testCase):
|
||||
# read sql from .sql file and execute
|
||||
tdLog.info(f"test normal query.")
|
||||
tdLog.info("test normal query.")
|
||||
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)
|
||||
|
||||
|
@ -97,531 +84,230 @@ class TDTestCase(TBase):
|
|||
self.test_normal_query_new("pi")
|
||||
|
||||
def test_round(self):
|
||||
self.test_normal_query("round")
|
||||
self.test_normal_query_new("round")
|
||||
|
||||
tdSql.query("select round(10, null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select round(null, 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select round(name, 2) from ts_4893.meters limit 1;")
|
||||
|
||||
def test_exp(self):
|
||||
self.test_normal_query("exp")
|
||||
self.test_normal_query_new("exp")
|
||||
|
||||
tdSql.query("select exp(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
def test_truncate(self):
|
||||
self.test_normal_query_new("trunc")
|
||||
|
||||
def test_trunc(self):
|
||||
self.test_normal_query("trunc")
|
||||
|
||||
tdSql.query("select truncate(99.99, null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select truncate(null, 3);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select truncate(0.999);")
|
||||
tdSql.error("select truncate(-1.999);")
|
||||
tdSql.error("select truncate(null);")
|
||||
tdSql.error("select truncate(name, 1) from ts_4893.meters limit 1;")
|
||||
|
||||
def test_ln(self):
|
||||
self.test_normal_query("ln")
|
||||
self.test_normal_query_new("ln")
|
||||
|
||||
tdSql.query("select ln(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select ln(name) from ts_4893.meters limit 1;")
|
||||
|
||||
def test_mod(self):
|
||||
self.test_normal_query("mod")
|
||||
self.test_normal_query_new("mod")
|
||||
|
||||
tdSql.query("select mod(null, 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select mod(10, null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select mod(10, 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select mod(name, 2) from ts_4893.meters limit 1;")
|
||||
|
||||
def test_sign(self):
|
||||
self.test_normal_query("sign")
|
||||
self.test_normal_query_new("sign")
|
||||
|
||||
tdSql.query("select sign(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select sign('');")
|
||||
tdSql.error("select sign('abc');")
|
||||
tdSql.error("select sign('123');")
|
||||
tdSql.error("select sign('-456');")
|
||||
|
||||
def test_degrees(self):
|
||||
self.test_normal_query("degrees")
|
||||
self.test_normal_query_new("degrees")
|
||||
|
||||
tdSql.query("select degrees(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select degrees('');")
|
||||
tdSql.error("select degrees('abc');")
|
||||
tdSql.error("select degrees('1.57');")
|
||||
|
||||
def test_radians(self):
|
||||
self.test_normal_query("radians")
|
||||
self.test_normal_query_new("radians")
|
||||
|
||||
tdSql.query("select radians(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select radians('');")
|
||||
tdSql.error("select radians('abc');")
|
||||
tdSql.error("select radians('45');")
|
||||
|
||||
def test_char_length(self):
|
||||
self.test_normal_query("char_length")
|
||||
self.test_normal_query_new("char_length")
|
||||
|
||||
tdSql.query("select char_length(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select char_length(12345);")
|
||||
tdSql.error("select char_length(true);")
|
||||
tdSql.error("select char_length(repeat('a', 1000000));")
|
||||
tdSql.error("select char_length(id) from ts_4893.meters;")
|
||||
|
||||
def test_char(self):
|
||||
self.test_normal_query("char")
|
||||
self.test_normal_query_new("char")
|
||||
|
||||
tdSql.query("select char(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, '')
|
||||
res = [[chr(0)], [chr(1)], [chr(2)], [chr(3)], [chr(4)], [chr(5)], [chr(6)], [chr(7)], [chr(8)], [chr(9)]]
|
||||
tdSql.checkDataMem("select char(id) from ts_4893.d0 limit 10;", res)
|
||||
tdSql.checkDataMem("select char(id) from ts_4893.meters limit 10;", res)
|
||||
|
||||
tdSql.query("select char('ustc');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, chr(0))
|
||||
|
||||
result1 = [[chr(0)], [chr(1)], [chr(2)], [chr(3)], [chr(4)], [chr(5)], [chr(6)], [chr(7)], [chr(8)], [chr(9)]]
|
||||
tdSql.checkDataMem("select char(id) from ts_4893.d0 limit 10;", result1)
|
||||
tdSql.checkDataMem("select char(id) from ts_4893.meters limit 10;", result1)
|
||||
|
||||
result2 = [[chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)]]
|
||||
tdSql.checkDataMem("select char(nch1) from ts_4893.d0 limit 10;", result2)
|
||||
tdSql.checkDataMem("select char(nch1) from ts_4893.meters limit 10;", result2)
|
||||
|
||||
tdSql.checkDataMem("select char(var1) from ts_4893.d0 limit 10;", result2)
|
||||
tdSql.checkDataMem("select char(var1) from ts_4893.meters limit 10;", result2)
|
||||
res = [[chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)], [chr(0)]]
|
||||
tdSql.checkDataMem("select char(nch1) from ts_4893.d0 limit 10;", res)
|
||||
tdSql.checkDataMem("select char(nch1) from ts_4893.meters limit 10;", res)
|
||||
tdSql.checkDataMem("select char(var1) from ts_4893.d0 limit 10;", res)
|
||||
tdSql.checkDataMem("select char(var1) from ts_4893.meters limit 10;", res)
|
||||
|
||||
def test_ascii(self):
|
||||
self.test_normal_query("ascii")
|
||||
self.test_normal_query_new("ascii")
|
||||
|
||||
tdSql.query("select ascii(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select ascii(123);")
|
||||
|
||||
def test_position(self):
|
||||
self.test_normal_query("position")
|
||||
|
||||
tdSql.query("select position('t' in null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select position(null in 'taos');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
self.test_normal_query_new("position")
|
||||
|
||||
def test_replace(self):
|
||||
self.test_normal_query("replace")
|
||||
|
||||
tdSql.query("select replace(null, 'aa', 'ee');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select replace('aabbccdd', null, 'ee');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
self.test_normal_query_new("replace")
|
||||
|
||||
def test_repeat(self):
|
||||
self.test_normal_query("repeat")
|
||||
|
||||
tdSql.query("select repeat('taos', null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select repeat(null, 3);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select repeat('taos', 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, '')
|
||||
self.test_normal_query_new("repeat")
|
||||
|
||||
def test_substr(self):
|
||||
self.test_normal_query("substr")
|
||||
|
||||
tdSql.query("select substring('tdengine', null, 3);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select substring(null, 1, 3);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select substring('tdengine', 1, null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select substring('tdengine', 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, '')
|
||||
|
||||
tdSql.query("select substring('tdengine', 10);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, '')
|
||||
|
||||
tdSql.query("select substring('tdengine', 1, 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, '')
|
||||
|
||||
tdSql.query("select substring('tdengine', 1, -1);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, '')
|
||||
self.test_normal_query_new("substr")
|
||||
|
||||
def test_substr_idx(self):
|
||||
self.test_normal_query("substr_idx")
|
||||
|
||||
tdSql.query("select substring_index(null, '.', 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select substring_index('www.taosdata.com', null, 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select substring_index('www.taosdata.com', '.', null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select substring_index('www.taosdata.com', '.', 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, '')
|
||||
self.test_normal_query_new("substr_idx")
|
||||
|
||||
def test_trim(self):
|
||||
self.test_normal_query("trim")
|
||||
|
||||
tdSql.query("select trim(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
self.test_normal_query_new("trim")
|
||||
|
||||
def test_timediff(self):
|
||||
self.test_normal_query("timediff")
|
||||
self.test_normal_query_new("timediff")
|
||||
|
||||
tdSql.query("select timediff(null, '2022-01-01 08:00:01',1s);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('2022-01-01 08:00:00', null,1s);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('2022/01/31', '2022/01/01',1s);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('20220131', '20220101',1s);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('22/01/31', '22/01/01',1s);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('01/31/22', '01/01/22',1s);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('31-JAN-22', '01-JAN-22',1s);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('22/01/31', '22/01/01');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select timediff('www', 'ttt');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select timediff(min(ts), '2023-01-01 00:00:00') from ts_4893.meters limit 1;")
|
||||
tdSql.error("select timediff(max(ts), '2023-12-31 23:59:59') from ts_4893.meters limit 1;")
|
||||
tdSql.error("select (select timediff(ts, (select max(ts) from ts_4893.meters)) from ts_4893.meters where id = m.id) from ts_4893.meters m;")
|
||||
|
||||
def test_week(self):
|
||||
self.test_normal_query("week")
|
||||
|
||||
tdSql.query("select week(null, 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('abc');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('1721020591', 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('1721020666229', 0);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('01/01/2020', 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('20200101', 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('20/01/01', 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('11/01/31', 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select week('01-JAN-20', 2);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
self.test_normal_query_new("week")
|
||||
|
||||
def test_weekday(self):
|
||||
self.test_normal_query("weekday")
|
||||
self.test_normal_query_new("weekday")
|
||||
|
||||
tdSql.query("select weekday(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('1721020591');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('1721020666229');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('abc');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('01/01/2020');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('20200101');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('20/01/01');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('11/01/32');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekday('01-JAN-20');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select weekday(hello) from ts_4893.meters limit 1;")
|
||||
|
||||
def test_weekofyear(self):
|
||||
self.test_normal_query("weekofyear")
|
||||
|
||||
tdSql.query("select weekofyear(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('1721020591');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('1721020666229');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('abc');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('01/01/2020');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('20200101');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('20/01/01');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('11/01/31');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select weekofyear('01-JAN-20');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
self.test_normal_query_new("weekofyear")
|
||||
|
||||
def test_dayofweek(self):
|
||||
self.test_normal_query("dayofweek")
|
||||
self.test_normal_query_new("dayofweek")
|
||||
|
||||
tdSql.query("select dayofweek(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
def test_stddev_pop(self):
|
||||
self.test_normal_query_new("stddev")
|
||||
|
||||
tdSql.query("select dayofweek('1721020591');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select dayofweek('1721020666229');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select dayofweek('abc');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select dayofweek('01/01/2020');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select dayofweek('20200101');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select dayofweek('20/01/01');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select dayofweek('11/01/31');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select dayofweek('01-JAN-20');")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
def test_stddev(self):
|
||||
self.test_normal_query("stddev")
|
||||
|
||||
tdSql.query("select stddev_pop(null) from ts_4893.d0;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select stddev_pop(null) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
tdSql.error("select stddev_pop(var1) from ts_4893.meters;")
|
||||
tdSql.error("select stddev_pop(current) from empty_ts_4893.meters;")
|
||||
tdSql.error("select stddev_pop(name) from ts_4893.meters;")
|
||||
tdSql.error("select stddev_pop(nonexistent_column) from ts_4893.meters;")
|
||||
|
||||
def test_varpop(self):
|
||||
self.test_normal_query("varpop")
|
||||
self.test_normal_query_new("varpop")
|
||||
|
||||
tdSql.query("select var_pop(null) from ts_4893.d0;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select var_pop(null) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
def test_error(self):
|
||||
tdSql.error(
|
||||
"select * from (select to_iso8601(ts, timezone()), timezone() from meters order by ts desc) limit 1000;",
|
||||
expectErrInfo="Not supported timzone format") # TS-5340
|
||||
tdSql.error("select var_pop(var1) from ts_4893.meters;")
|
||||
tdSql.error("select var_pop(current) from empty_ts_4893.meters;")
|
||||
tdSql.error("select var_pop(name) from ts_4893.meters;")
|
||||
tdSql.error("select var_pop(nonexistent_column) from ts_4893.meters;")
|
||||
|
||||
def test_rand(self):
|
||||
self.test_normal_query("rand")
|
||||
self.test_normal_query_new("rand")
|
||||
|
||||
tdSql.query("select rand();")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
self.check_result_in_range(0, 0)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand(null);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
self.check_result_in_range(0, 0)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand() where rand() >= 0;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand() where rand() < 1;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand() where rand() >= 0 and rand() < 1;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand() from (select 1) t limit 1;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
self.check_result_in_range(0, 0)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand(id) from ts_4893.d0 limit 100;")
|
||||
tdSql.checkRows(100)
|
||||
tdSql.query("select round(rand(), 3)")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
for i in range(len(tdSql.res)):
|
||||
self.check_result_in_range(i, 0)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand(id) from ts_4893.meters limit 100;")
|
||||
tdSql.checkRows(100)
|
||||
tdSql.query("select pow(rand(), 2)")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
for i in range(len(tdSql.res)):
|
||||
self.check_result_in_range(i, 0)
|
||||
res = tdSql.getData(0, 0)
|
||||
self.check_rand_data_range(res, 0)
|
||||
|
||||
tdSql.query("select rand(123), rand(123);")
|
||||
tdSql.query("select rand(12345), rand(12345);")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(2)
|
||||
if tdSql.res[0][0] != tdSql.res[0][1]:
|
||||
res0 = tdSql.getData(0, 0)
|
||||
res1 = tdSql.getData(0, 1)
|
||||
if res0 != res1:
|
||||
caller = inspect.getframeinfo(inspect.stack()[1][0])
|
||||
args = (caller.filename, caller.lineno, tdSql.sql, tdSql.res[0][0], tdSql.res[0][1])
|
||||
tdLog.exit("%s(%d) failed: sql:%s data1:%s ne data2:%s" % args)
|
||||
args = (caller.filename, caller.lineno, self.sql, 1, self.queryRows)
|
||||
tdLog.exit("%s(%d) failed: sql:%s, row:%d is larger than queryRows:%d" % args)
|
||||
|
||||
def check_result_in_range(self, row, col):
|
||||
res = tdSql.res[row][col]
|
||||
if res < 0 or res >= 1:
|
||||
tdSql.error("select rand(3.14);")
|
||||
tdSql.error("select rand(-3.14);")
|
||||
tdSql.error("select rand('');")
|
||||
tdSql.error("select rand('hello');")
|
||||
|
||||
def check_rand_data_range(self, data, row):
|
||||
if data < 0 or data >= 1:
|
||||
caller = inspect.getframeinfo(inspect.stack()[1][0])
|
||||
args = (caller.filename, caller.lineno, tdSql.sql, row, col, res)
|
||||
tdLog.exit("%s(%d) failed: sql:%s row:%s col:%s data:%s lt 0 or ge 1" % args)
|
||||
args = (caller.filename, caller.lineno, self.sql, row+1, self.queryRows)
|
||||
tdLog.exit("%s(%d) failed: sql:%s, row:%d is larger than queryRows:%d" % args)
|
||||
|
||||
def test_max(self):
|
||||
self.test_normal_query("max")
|
||||
self.test_normal_query_new("max")
|
||||
|
||||
tdSql.query("select max(null) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
tdSql.checkData(0, 0, 'None')
|
||||
|
||||
tdSql.query("select max(id) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.query("select max(name) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.query("select max(current) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.query("select max(nch1) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.query("select max(var1) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.error("select max(nonexistent_column) from ts_4893.meters;")
|
||||
|
||||
def test_min(self):
|
||||
self.test_normal_query("min")
|
||||
self.test_normal_query_new("min")
|
||||
|
||||
tdSql.query("select min(null) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(1)
|
||||
tdSql.checkData(0, 0, 'None')
|
||||
tdSql.error("select min(nonexistent_column) from ts_4893.meters;")
|
||||
|
||||
tdSql.query("select min(id) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
def test_error(self):
|
||||
tdSql.error("select * from (select to_iso8601(ts, timezone()), timezone() from ts_4893.meters \
|
||||
order by ts desc) limit 1000;", expectErrInfo="Not supported timzone format") # TS-5340
|
||||
|
||||
tdSql.query("select min(name) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.query("select min(current) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.query("select min(nch1) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
tdSql.query("select min(var1) from ts_4893.meters;")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
# run
|
||||
def run(self):
|
||||
tdLog.debug(f"start to excute {__file__}")
|
||||
|
||||
# insert data
|
||||
self.insertData()
|
||||
self.insert_data()
|
||||
|
||||
# math function
|
||||
self.test_pi()
|
||||
self.test_round()
|
||||
self.test_exp()
|
||||
self.test_trunc()
|
||||
self.test_truncate()
|
||||
self.test_ln()
|
||||
self.test_mod()
|
||||
self.test_sign()
|
||||
|
@ -648,7 +334,7 @@ class TDTestCase(TBase):
|
|||
self.test_dayofweek()
|
||||
|
||||
# agg function
|
||||
self.test_stddev()
|
||||
self.test_stddev_pop()
|
||||
self.test_varpop()
|
||||
|
||||
# select function
|
||||
|
|
Loading…
Reference in New Issue