test(func): modify sql func test cases
This commit is contained in:
parent
48d0fdf437
commit
d2b2c4e381
|
@ -0,0 +1,302 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,129 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,259 @@
|
|||
|
||||
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
|
||||
groupid | max(char_length(name)) |
|
||||
===================================
|
||||
1 | 4 |
|
||||
|
||||
taos> select location, avg(char_length(name)) from ts_4893.meters group 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.
|
|
@ -0,0 +1,262 @@
|
|||
|
||||
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
|
||||
groupid | sum(dayofweek(ts)) |
|
||||
==================================
|
||||
1 | 400012 |
|
||||
|
Can't render this file because it has a wrong number of fields in line 248.
|
|
@ -0,0 +1,270 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,260 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,265 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,605 @@
|
|||
|
||||
taos> select MAX(current) from ts_4893.meters
|
||||
max(current) |
|
||||
=======================
|
||||
11.9989996 |
|
||||
|
||||
taos> select MAX(voltage) from ts_4893.meters
|
||||
max(voltage) |
|
||||
===============
|
||||
224 |
|
||||
|
||||
taos> select MAX(name) from ts_4893.meters
|
||||
max(name) |
|
||||
=================================
|
||||
x |
|
||||
|
||||
taos> select MAX(nch1) from ts_4893.meters
|
||||
max(nch1) |
|
||||
=================================
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select MAX(nch2) from ts_4893.meters
|
||||
max(nch2) |
|
||||
=================================
|
||||
四 |
|
||||
|
||||
taos> select MAX(var1) from ts_4893.meters
|
||||
max(var1) |
|
||||
=================================
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select MAX(var2) from ts_4893.meters
|
||||
max(var2) |
|
||||
=================================
|
||||
四 |
|
||||
|
||||
taos> select MAX(id) from ts_4893.meters interval(60d)
|
||||
max(id) |
|
||||
==============
|
||||
1110 |
|
||||
2838 |
|
||||
4566 |
|
||||
6294 |
|
||||
8022 |
|
||||
9750 |
|
||||
9999 |
|
||||
3206 |
|
||||
4934 |
|
||||
6662 |
|
||||
8390 |
|
||||
9999 |
|
||||
1846 |
|
||||
3574 |
|
||||
5302 |
|
||||
7030 |
|
||||
8758 |
|
||||
9999 |
|
||||
2214 |
|
||||
3942 |
|
||||
5670 |
|
||||
7398 |
|
||||
9126 |
|
||||
9999 |
|
||||
2582 |
|
||||
4310 |
|
||||
6038 |
|
||||
7766 |
|
||||
9494 |
|
||||
9999 |
|
||||
2950 |
|
||||
4678 |
|
||||
6406 |
|
||||
8134 |
|
||||
9862 |
|
||||
9999 |
|
||||
3318 |
|
||||
5046 |
|
||||
6774 |
|
||||
8502 |
|
||||
9999 |
|
||||
1958 |
|
||||
3686 |
|
||||
5414 |
|
||||
7142 |
|
||||
8870 |
|
||||
9999 |
|
||||
2326 |
|
||||
4054 |
|
||||
5782 |
|
||||
7510 |
|
||||
9238 |
|
||||
9999 |
|
||||
2694 |
|
||||
4422 |
|
||||
6150 |
|
||||
7878 |
|
||||
9606 |
|
||||
9999 |
|
||||
|
||||
taos> select MAX(current) from ts_4893.meters interval(60d)
|
||||
max(current) |
|
||||
=======================
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9980001 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9980001 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9980001 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9980001 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9980001 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9980001 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9969997 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9989996 |
|
||||
11.9860001 |
|
||||
|
||||
taos> select MAX(voltage) from ts_4893.meters interval(60d)
|
||||
max(voltage) |
|
||||
===============
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
224 |
|
||||
|
||||
taos> select MAX(name) from ts_4893.meters interval(60d)
|
||||
max(name) |
|
||||
=================================
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
x |
|
||||
|
||||
taos> select MAX(nch1) from ts_4893.meters interval(60d)
|
||||
max(nch1) |
|
||||
=================================
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select MAX(nch2) from ts_4893.meters interval(60d)
|
||||
max(nch2) |
|
||||
=================================
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
|
||||
taos> select MAX(var1) from ts_4893.meters interval(60d)
|
||||
max(var1) |
|
||||
=================================
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select MAX(var2) from ts_4893.meters interval(60d)
|
||||
max(var2) |
|
||||
=================================
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
四 |
|
||||
|
||||
taos> select max(null) from ts_4893.meters
|
||||
max(null) |
|
||||
========================
|
||||
NULL |
|
||||
|
||||
taos> select max(id) from ts_4893.meters
|
||||
max(id) |
|
||||
==============
|
||||
9999 |
|
||||
|
||||
taos> select max(id) from ts_4893.meters where id > 0
|
||||
max(id) |
|
||||
==============
|
||||
9999 |
|
||||
|
||||
taos> select max(id) from ts_4893.meters where id <= 0
|
||||
max(id) |
|
||||
==============
|
||||
0 |
|
||||
|
||||
taos> select max(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
|
||||
max(phase) |
|
||||
=======================
|
||||
0.9999660 |
|
||||
|
||||
taos> select max(voltage) from ts_4893.meters where voltage is not null
|
||||
max(voltage) |
|
||||
===============
|
||||
224 |
|
||||
|
||||
taos> select max(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
|
||||
max(total_voltage) |
|
||||
========================
|
||||
21948660 |
|
||||
|
||||
taos> select location, max(current) from ts_4893.meters group by location
|
||||
location | max(current) |
|
||||
============================================
|
||||
beijing | 11.9989996 |
|
||||
|
||||
taos> select location, max(id) from ts_4893.meters group by location
|
||||
location | max(id) |
|
||||
===================================
|
||||
beijing | 9999 |
|
||||
|
||||
taos> select groupid, max(voltage) from ts_4893.meters group by groupid
|
||||
groupid | max(voltage) |
|
||||
=========================
|
||||
1 | 224 |
|
||||
|
||||
taos> select round(max(current), 2) from ts_4893.meters
|
||||
round(max(current), 2) |
|
||||
=========================
|
||||
1.2000000e+01 |
|
||||
|
||||
taos> select pow(max(current), 2) from ts_4893.meters
|
||||
pow(max(current), 2) |
|
||||
============================
|
||||
143.975991296219036 |
|
||||
|
||||
taos> select log(max(voltage) + 1) from ts_4893.meters
|
||||
log(max(voltage) + 1) |
|
||||
============================
|
||||
5.416100402204420 |
|
||||
|
Can't render this file because it has a wrong number of fields in line 576.
|
|
@ -0,0 +1,605 @@
|
|||
|
||||
taos> select MIN(id) from ts_4893.meters
|
||||
min(id) |
|
||||
==============
|
||||
0 |
|
||||
|
||||
taos> select MIN(current) from ts_4893.meters
|
||||
min(current) |
|
||||
=======================
|
||||
8.0000000 |
|
||||
|
||||
taos> select MIN(voltage) from ts_4893.meters
|
||||
min(voltage) |
|
||||
===============
|
||||
215 |
|
||||
|
||||
taos> select MIN(name) from ts_4893.meters
|
||||
min(name) |
|
||||
=================================
|
||||
haha |
|
||||
|
||||
taos> select MIN(nch1) from ts_4893.meters
|
||||
min(nch1) |
|
||||
=================================
|
||||
abc一二三abc一二三abc |
|
||||
|
||||
taos> select MIN(nch2) from ts_4893.meters
|
||||
min(nch2) |
|
||||
=================================
|
||||
a |
|
||||
|
||||
taos> select MIN(var1) from ts_4893.meters
|
||||
min(var1) |
|
||||
=================================
|
||||
abc一二三abc一二三abc |
|
||||
|
||||
taos> select MIN(var2) from ts_4893.meters
|
||||
min(var2) |
|
||||
=================================
|
||||
a |
|
||||
|
||||
taos> select MIN(id) from ts_4893.meters interval(60d)
|
||||
min(id) |
|
||||
==============
|
||||
0 |
|
||||
1111 |
|
||||
2839 |
|
||||
4567 |
|
||||
6295 |
|
||||
8023 |
|
||||
0 |
|
||||
1479 |
|
||||
3207 |
|
||||
4935 |
|
||||
6663 |
|
||||
0 |
|
||||
119 |
|
||||
1847 |
|
||||
3575 |
|
||||
5303 |
|
||||
7031 |
|
||||
0 |
|
||||
487 |
|
||||
2215 |
|
||||
3943 |
|
||||
5671 |
|
||||
7399 |
|
||||
0 |
|
||||
855 |
|
||||
2583 |
|
||||
4311 |
|
||||
6039 |
|
||||
7767 |
|
||||
0 |
|
||||
1223 |
|
||||
2951 |
|
||||
4679 |
|
||||
6407 |
|
||||
8135 |
|
||||
0 |
|
||||
1591 |
|
||||
3319 |
|
||||
5047 |
|
||||
6775 |
|
||||
0 |
|
||||
231 |
|
||||
1959 |
|
||||
3687 |
|
||||
5415 |
|
||||
7143 |
|
||||
0 |
|
||||
599 |
|
||||
2327 |
|
||||
4055 |
|
||||
5783 |
|
||||
7511 |
|
||||
0 |
|
||||
967 |
|
||||
2695 |
|
||||
4423 |
|
||||
6151 |
|
||||
7879 |
|
||||
9607 |
|
||||
|
||||
taos> select MIN(current) from ts_4893.meters interval(60d)
|
||||
min(current) |
|
||||
=======================
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0010004 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0030003 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0030003 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0010004 |
|
||||
8.0089998 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0030003 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0000000 |
|
||||
8.0019999 |
|
||||
8.0010004 |
|
||||
8.0000000 |
|
||||
8.0050001 |
|
||||
|
||||
taos> select MIN(voltage) from ts_4893.meters interval(60d)
|
||||
min(voltage) |
|
||||
===============
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
215 |
|
||||
|
||||
taos> select MIN(name) from ts_4893.meters interval(60d)
|
||||
min(name) |
|
||||
=================================
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
haha |
|
||||
|
||||
taos> select MIN(nch1) from ts_4893.meters interval(60d)
|
||||
min(nch1) |
|
||||
=================================
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
|
||||
taos> select MIN(nch2) from ts_4893.meters interval(60d)
|
||||
min(nch2) |
|
||||
=================================
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
|
||||
taos> select MIN(var1) from ts_4893.meters interval(60d)
|
||||
min(var1) |
|
||||
=================================
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
abc一二三abc一二三abc |
|
||||
|
||||
taos> select MIN(var2) from ts_4893.meters interval(60d)
|
||||
min(var2) |
|
||||
=================================
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
a |
|
||||
|
||||
taos> select min(null) from ts_4893.meters
|
||||
min(null) |
|
||||
========================
|
||||
NULL |
|
||||
|
||||
taos> select min(id) from ts_4893.meters where id > 0
|
||||
min(id) |
|
||||
==============
|
||||
1 |
|
||||
|
||||
taos> select min(id) from ts_4893.meters where id <= 0
|
||||
min(id) |
|
||||
==============
|
||||
0 |
|
||||
|
||||
taos> select min(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59'
|
||||
min(phase) |
|
||||
=======================
|
||||
0.0001700 |
|
||||
|
||||
taos> select min(voltage) from ts_4893.meters where voltage is not null
|
||||
min(voltage) |
|
||||
===============
|
||||
215 |
|
||||
|
||||
taos> select min(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location)
|
||||
min(total_voltage) |
|
||||
========================
|
||||
21948660 |
|
||||
|
||||
taos> select groupid, min(voltage) from ts_4893.meters group by groupid
|
||||
groupid | min(voltage) |
|
||||
=========================
|
||||
1 | 215 |
|
||||
|
||||
taos> select location, min(current) from ts_4893.meters group by location
|
||||
location | min(current) |
|
||||
============================================
|
||||
beijing | 8.0000000 |
|
||||
|
||||
taos> select location, min(id) from ts_4893.meters group by location
|
||||
location | min(id) |
|
||||
===================================
|
||||
beijing | 0 |
|
||||
|
||||
taos> select round(min(current), 2) from ts_4893.meters
|
||||
round(min(current), 2) |
|
||||
=========================
|
||||
8.0000000e+00 |
|
||||
|
||||
taos> select pow(min(current), 2) from ts_4893.meters
|
||||
pow(min(current), 2) |
|
||||
============================
|
||||
64.000000000000000 |
|
||||
|
||||
taos> select log(min(voltage) + 1) from ts_4893.meters
|
||||
log(min(voltage) + 1) |
|
||||
============================
|
||||
5.375278407684165 |
|
||||
|
Can't render this file because it has a wrong number of fields in line 576.
|
|
@ -0,0 +1,235 @@
|
|||
|
||||
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 |
|
||||
|
|
|
@ -112,3 +112,83 @@ taos> select 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.
|
|
@ -0,0 +1,447 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,275 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,173 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,396 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,979 @@
|
|||
|
||||
taos> select replace('aaaa','a','b')
|
||||
replace('aaaa','a','b') |
|
||||
==========================
|
||||
bbbb |
|
||||
|
||||
taos> select replace('aaaa','aa','b')
|
||||
replace('aaaa','aa','b') |
|
||||
===========================
|
||||
bb |
|
||||
|
||||
taos> select replace('aaaa','a','bb')
|
||||
replace('aaaa','a','bb') |
|
||||
===========================
|
||||
bbbbbbbb |
|
||||
|
||||
taos> select replace('aaaa','','b')
|
||||
replace('aaaa','','b') |
|
||||
=========================
|
||||
aaaa |
|
||||
|
||||
taos> select replace('bbbb','a','c')
|
||||
replace('bbbb','a','c') |
|
||||
==========================
|
||||
bbbb |
|
||||
|
||||
taos> select replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper('false'),' ','test'),'FALSE','REAL')
|
||||
replace(concat(lower(concat('THIS',' ','IS',' ','A',' ')),upper( |
|
||||
===================================================================
|
||||
this is a REAL test |
|
||||
|
||||
taos> select replace('北京涛思','北京', '')
|
||||
replace('北京涛思','北京', '') |
|
||||
=======================================
|
||||
涛思 |
|
||||
|
||||
taos> select replace('北京涛思','涛思', '')
|
||||
replace('北京涛思','涛思', '') |
|
||||
=======================================
|
||||
北京 |
|
||||
|
||||
taos> select replace('北京涛思.com','思.', '北京')
|
||||
replace('北京涛思.com','思.', '北京') |
|
||||
===============================================
|
||||
北京涛北京com |
|
||||
|
||||
taos> select replace('北京涛思.com','北com', '北京涛')
|
||||
replace('北京涛思.com','北com', '北京涛') |
|
||||
====================================================
|
||||
北京涛思.com |
|
||||
|
||||
taos> select replace('北京涛思', char(ascii('北')), 'wrongans')
|
||||
replace('北京涛思', char(ascii('北')), 'wrongans') |
|
||||
==========================================================
|
||||
北京涛思 |
|
||||
|
||||
taos> select replace(nch1, 'a', 'b') from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, 'a', 'b') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
updbte |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, 'a', 'b') |
|
||||
=================================
|
||||
updbte |
|
||||
bgbin |
|
||||
bgbin |
|
||||
plbte |
|
||||
bbc一二三bbc一二三bbc |
|
||||
|
||||
taos> select replace(nch1, 'a', 'b') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, 'a', 'b') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, 'a', '啊') from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, 'a', '啊') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
upd啊te |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, 'a', '啊') |
|
||||
=================================
|
||||
upd啊te |
|
||||
啊g啊in |
|
||||
啊g啊in |
|
||||
pl啊te |
|
||||
啊bc一二三啊bc一二三啊bc |
|
||||
|
||||
taos> select replace(nch1, 'a', '啊') from ts_4893.meters where position('a' IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, 'a', '啊') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '一', '壹') from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, '一', '壹') |
|
||||
=================================
|
||||
novel |
|
||||
壹二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, '一', '壹') |
|
||||
=================================
|
||||
壹二三四五六七八九十 |
|
||||
壹二三四五六七八九十 |
|
||||
abc壹二三abc壹二三abc |
|
||||
壹壹壹壹壹||壹壹壹壹 |
|
||||
壹二三123321三二壹 |
|
||||
|
||||
taos> select replace(nch1, '一', '壹') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, '一', '壹') |
|
||||
=================================
|
||||
novel |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '一', '1') from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, '一', '1') |
|
||||
=================================
|
||||
novel |
|
||||
1二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, '一', '1') |
|
||||
=================================
|
||||
1二三四五六七八九十 |
|
||||
1二三四五六七八九十 |
|
||||
abc1二三abc1二三abc |
|
||||
11111||1111 |
|
||||
1二三123321三二1 |
|
||||
|
||||
taos> select replace(nch1, '一', '1') from ts_4893.meters where position('一' IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, '一', '1') |
|
||||
=================================
|
||||
novel |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, nch2, 'nch2') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novnch2l |
|
||||
|
||||
taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, nch2, 'nch2') |
|
||||
=================================
|
||||
novnch2l |
|
||||
anch2c一二三anch2c一二三anch2c |
|
||||
一二三anch2c |
|
||||
一二三nch2五六七八九十 |
|
||||
pnch2rson |
|
||||
|
||||
taos> select replace(nch1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, nch2, 'nch2') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, var2, 'var2') from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, var2, 'var2') |
|
||||
=================================
|
||||
novvar2l |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, var2, 'var2') |
|
||||
=================================
|
||||
novvar2l |
|
||||
novvar2l |
|
||||
var2abc |
|
||||
var2123321三二一 |
|
||||
abvar2一二三abvar2一二三abvar2 |
|
||||
|
||||
taos> select replace(nch1, var2, 'var2') from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, var2, 'var2') |
|
||||
=================================
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '三', nch2) from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, '三', nch2) |
|
||||
=================================
|
||||
novel |
|
||||
一二f四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, '三', nch2) |
|
||||
=================================
|
||||
一二f四五六七八九十 |
|
||||
一二d四五六七八九十 |
|
||||
abc一二babc一二babc |
|
||||
一二三a123321三a二一 |
|
||||
一二babc |
|
||||
|
||||
taos> select replace(nch1, '三', nch2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, '三', nch2) |
|
||||
=================================
|
||||
novel |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '三', var2) from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, '三', var2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三a四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, '三', var2) |
|
||||
=================================
|
||||
一二三a四五六七八九十 |
|
||||
一二b四五六七八九十 |
|
||||
abc一二fabc一二fabc |
|
||||
一二三a123321三a二一 |
|
||||
一二一二三abc |
|
||||
|
||||
taos> select replace(nch1, '三', var2) from ts_4893.meters where position('三' IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, '三', var2) |
|
||||
=================================
|
||||
novel |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, nch2, var2) from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, nch2, var2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novbl |
|
||||
|
||||
taos> select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, nch2, var2) |
|
||||
=================================
|
||||
novbl |
|
||||
afc一二三afc一二三afc |
|
||||
一二三a一二三c |
|
||||
一二三三a五六七八九十 |
|
||||
pdrson |
|
||||
|
||||
taos> select replace(nch1, nch2, var2) from ts_4893.meters where position(nch2 IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, nch2, var2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, var2, nch2) from ts_4893.meters order by ts limit 5
|
||||
replace(nch1, var2, nch2) |
|
||||
=================================
|
||||
nov四l |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) != 0 order by ts limit 5
|
||||
replace(nch1, var2, nch2) |
|
||||
=================================
|
||||
nov四l |
|
||||
novcl |
|
||||
babc |
|
||||
三a123321三二一 |
|
||||
abf一二三abf一二三abf |
|
||||
|
||||
taos> select replace(nch1, var2, nch2) from ts_4893.meters where position(var2 IN nch1) = 0 order by ts limit 5
|
||||
replace(nch1, var2, nch2) |
|
||||
=================================
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select replace(var1, 'a', 'b') from ts_4893.meters order by ts limit 5
|
||||
replace(var1, 'a', 'b') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plbte |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
|
||||
replace(var1, 'a', 'b') |
|
||||
=================================
|
||||
plbte |
|
||||
updbte |
|
||||
plbte |
|
||||
updbte |
|
||||
一二三bbc |
|
||||
|
||||
taos> select replace(var1, 'a', 'b') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
|
||||
replace(var1, 'a', 'b') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
prision |
|
||||
|
||||
taos> select replace(var1, 'a', '啊') from ts_4893.meters order by ts limit 5
|
||||
replace(var1, 'a', '啊') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
pl啊te |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) != 0 order by ts limit 5
|
||||
replace(var1, 'a', '啊') |
|
||||
=================================
|
||||
pl啊te |
|
||||
upd啊te |
|
||||
pl啊te |
|
||||
upd啊te |
|
||||
一二三啊bc |
|
||||
|
||||
taos> select replace(var1, 'a', '啊') from ts_4893.meters where position('a' IN var1) = 0 order by ts limit 5
|
||||
replace(var1, 'a', '啊') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
prision |
|
||||
|
||||
taos> select replace(var1, '一', '壹') from ts_4893.meters order by ts limit 5
|
||||
replace(var1, '一', '壹') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
壹二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
|
||||
replace(var1, '一', '壹') |
|
||||
=================================
|
||||
壹二三四五六七八九十 |
|
||||
壹二三abc |
|
||||
abc壹二三abc壹二三abc |
|
||||
壹二三123321三二壹 |
|
||||
壹壹壹壹壹||壹壹壹壹 |
|
||||
|
||||
taos> select replace(var1, '一', '壹') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
|
||||
replace(var1, '一', '壹') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
update |
|
||||
|
||||
taos> select replace(var1, '一', '1') from ts_4893.meters order by ts limit 5
|
||||
replace(var1, '一', '1') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
1二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) != 0 order by ts limit 5
|
||||
replace(var1, '一', '1') |
|
||||
=================================
|
||||
1二三四五六七八九十 |
|
||||
1二三abc |
|
||||
abc1二三abc1二三abc |
|
||||
1二三123321三二1 |
|
||||
11111||1111 |
|
||||
|
||||
taos> select replace(var1, '一', '1') from ts_4893.meters where position('一' IN var1) = 0 order by ts limit 5
|
||||
replace(var1, '一', '1') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
update |
|
||||
|
||||
taos> select replace(var1, nch2, 'nch2') from ts_4893.meters order by ts limit 5
|
||||
replace(var1, nch2, 'nch2') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
|
||||
replace(var1, nch2, 'nch2') |
|
||||
=================================
|
||||
一二nch2bc |
|
||||
anch2c一二三anch2c一二三anch2c |
|
||||
nch2bc一二三nch2bc一二三nch2bc |
|
||||
novnch2l |
|
||||
upnch2ate |
|
||||
|
||||
taos> select replace(var1, nch2, 'nch2') from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
|
||||
replace(var1, nch2, 'nch2') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, var2, 'var2') from ts_4893.meters order by ts limit 5
|
||||
replace(var1, var2, 'var2') |
|
||||
=================================
|
||||
novvar2l |
|
||||
person |
|
||||
novel |
|
||||
platvar2 |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
|
||||
replace(var1, var2, 'var2') |
|
||||
=================================
|
||||
novvar2l |
|
||||
platvar2 |
|
||||
一二三var2bc |
|
||||
var2123321三二一 |
|
||||
abvar2一二三abvar2一二三abvar2 |
|
||||
|
||||
taos> select replace(var1, var2, 'var2') from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
|
||||
replace(var1, var2, 'var2') |
|
||||
=================================
|
||||
person |
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
|
||||
taos> select replace(var1, '三', nch2) from ts_4893.meters order by ts limit 5
|
||||
replace(var1, '三', nch2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二e四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
|
||||
replace(var1, '三', nch2) |
|
||||
=================================
|
||||
一二e四五六七八九十 |
|
||||
一二三aabc |
|
||||
abc一二babc一二babc |
|
||||
一二三a123321三a二一 |
|
||||
一二c四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, '三', nch2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
|
||||
replace(var1, '三', nch2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
update |
|
||||
|
||||
taos> select replace(var1, '三', var2) from ts_4893.meters order by ts limit 5
|
||||
replace(var1, '三', var2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二b四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) != 0 order by ts limit 5
|
||||
replace(var1, '三', var2) |
|
||||
=================================
|
||||
一二b四五六七八九十 |
|
||||
一二aabc |
|
||||
abc一二fabc一二fabc |
|
||||
一二四123321四二一 |
|
||||
一二b四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, '三', var2) from ts_4893.meters where position('三' IN var1) = 0 order by ts limit 5
|
||||
replace(var1, '三', var2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
update |
|
||||
|
||||
taos> select replace(var1, nch2, var2) from ts_4893.meters order by ts limit 5
|
||||
replace(var1, nch2, var2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) != 0 order by ts limit 5
|
||||
replace(var1, nch2, var2) |
|
||||
=================================
|
||||
一二abc |
|
||||
afc一二三afc一二三afc |
|
||||
四bc一二三四bc一二三四bc |
|
||||
novdl |
|
||||
up一二三ate |
|
||||
|
||||
taos> select replace(var1, nch2, var2) from ts_4893.meters where position(nch2 IN var1) = 0 order by ts limit 5
|
||||
replace(var1, nch2, var2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, var2, nch2) from ts_4893.meters order by ts limit 5
|
||||
replace(var1, var2, nch2) |
|
||||
=================================
|
||||
nov四l |
|
||||
person |
|
||||
novel |
|
||||
plat一 |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) != 0 order by ts limit 5
|
||||
replace(var1, var2, nch2) |
|
||||
=================================
|
||||
nov四l |
|
||||
plat一 |
|
||||
一二三三abc |
|
||||
b123321三二一 |
|
||||
abf一二三abf一二三abf |
|
||||
|
||||
taos> select replace(var1, var2, nch2) from ts_4893.meters where position(var2 IN var1) = 0 order by ts limit 5
|
||||
replace(var1, var2, nch2) |
|
||||
=================================
|
||||
person |
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
|
||||
===================================================================
|
||||
一二三nch2五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdench2ghijk213124123 |
|
||||
一二三四五六七abnch2defghijk213124123 |
|
||||
nch2二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdnch2fghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
|
||||
===================================================================
|
||||
一二三nch2五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdench2ghijk213124123 |
|
||||
一二三四五六七abnch2defghijk213124123 |
|
||||
nch2二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdnch2fghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2') from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', nch2, 'nch2 |
|
||||
===================================================================
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
|
||||
===================================================================
|
||||
一二三e五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcde三aghijk213124123 |
|
||||
一二三四五六七ab四defghijk213124123 |
|
||||
e二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdbfghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
|
||||
===================================================================
|
||||
一二三e五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcde三aghijk213124123 |
|
||||
一二三四五六七ab四defghijk213124123 |
|
||||
e二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdbfghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', nch2, var2) from ts_4893.meters where position(nch2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', nch2, var2) |
|
||||
===================================================================
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
|
||||
===================================================================
|
||||
一二三四五六七abcdvar2fghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三var2五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdvar2fghijk213124123 |
|
||||
一二三四五六七avar2cdefghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
|
||||
===================================================================
|
||||
一二三四五六七abcdvar2fghijk213124123 |
|
||||
一二三var2五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdvar2fghijk213124123 |
|
||||
一二三四五六七avar2cdefghijk213124123 |
|
||||
一二三四五六七abcdefvar2hijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', var2, 'var2 |
|
||||
===================================================================
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
|
||||
===================================================================
|
||||
一二三四五六七abcd四fghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三c五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcd一fghijk213124123 |
|
||||
一二三四五六七aecdefghijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
|
||||
===================================================================
|
||||
一二三四五六七abcd四fghijk213124123 |
|
||||
一二三c五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcd一fghijk213124123 |
|
||||
一二三四五六七aecdefghijk213124123 |
|
||||
一二三四五六七abcdef一二三hijk213124123 |
|
||||
|
||||
taos> select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5
|
||||
replace('一二三四五六七abcdefghijk213124123', var2, nch2) |
|
||||
===================================================================
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
一二三四五六七abcdefghijk213124123 |
|
||||
|
||||
taos> select replace('aabbccdd','aa', 'ee')
|
||||
replace('aabbccdd','aa', 'ee') |
|
||||
=================================
|
||||
eebbccdd |
|
||||
|
||||
taos> select replace('aabbccdd','AA', 'ee')
|
||||
replace('aabbccdd','AA', 'ee') |
|
||||
=================================
|
||||
aabbccdd |
|
||||
|
||||
taos> select replace('北京','北' , '南')
|
||||
replace('北京','北' , '南') |
|
||||
==================================
|
||||
南京 |
|
||||
|
||||
taos> select replace('北京','京' , '南')
|
||||
replace('北京','京' , '南') |
|
||||
==================================
|
||||
北南 |
|
||||
|
||||
taos> select replace('北京taos','北' , '南')
|
||||
replace('北京taos','北' , '南') |
|
||||
======================================
|
||||
南京taos |
|
||||
|
||||
taos> select replace(nch1, nch2, 't') from ts_4893.d0 order by ts limit 10
|
||||
replace(nch1, nch2, 't') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novtl |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select replace(nch1, nch2, 't') from ts_4893.meters order by ts limit 10
|
||||
replace(nch1, nch2, 't') |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novtl |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select replace(nch1, var2, 't') from ts_4893.d0 order by ts limit 10
|
||||
replace(nch1, var2, 't') |
|
||||
=================================
|
||||
novtl |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novtl |
|
||||
again |
|
||||
|
||||
taos> select replace(nch1, var2, 't') from ts_4893.meters order by ts limit 10
|
||||
replace(nch1, var2, 't') |
|
||||
=================================
|
||||
novtl |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novtl |
|
||||
again |
|
||||
|
||||
taos> select replace(var1, nch2, 't') from ts_4893.d0 order by ts limit 10
|
||||
replace(var1, nch2, 't') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select replace(var1, nch2, 't') from ts_4893.meters order by ts limit 10
|
||||
replace(var1, nch2, 't') |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select replace(var1, var2, 't') from ts_4893.d0 order by ts limit 10
|
||||
replace(var1, var2, 't') |
|
||||
=================================
|
||||
novtl |
|
||||
person |
|
||||
novel |
|
||||
platt |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select replace(var1, var2, 't') from ts_4893.meters order by ts limit 10
|
||||
replace(var1, var2, 't') |
|
||||
=================================
|
||||
novtl |
|
||||
person |
|
||||
novel |
|
||||
platt |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select replace(nch1, nch2, var1) from ts_4893.d0 order by ts limit 10
|
||||
replace(nch1, nch2, var1) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
nov一二三四五六七八九十l |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select replace(nch1, nch2, var1) from ts_4893.meters order by ts limit 10
|
||||
replace(nch1, nch2, var1) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
nov一二三四五六七八九十l |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select replace(null, 'aa', 'ee')
|
||||
replace(null, 'aa', 'ee') |
|
||||
============================
|
||||
NULL |
|
||||
|
||||
taos> select replace(null, 'A', 'B')
|
||||
replace(null, 'A', 'B') |
|
||||
==========================
|
||||
NULL |
|
||||
|
||||
taos> select replace('', '', 'B')
|
||||
replace('', '', 'B') |
|
||||
=======================
|
||||
|
|
||||
|
||||
taos> select replace('', 'A', 'B')
|
||||
replace('', 'A', 'B') |
|
||||
========================
|
||||
|
|
||||
|
||||
taos> select replace('A', 'A', '')
|
||||
replace('A', 'A', '') |
|
||||
========================
|
||||
|
|
||||
|
||||
taos> select replace('aabbccdd', null, 'ee')
|
||||
replace('aabbccdd', null, 'ee') |
|
||||
==================================
|
||||
NULL |
|
||||
|
||||
taos> select replace('Hello', 'Z', 'X')
|
||||
replace('Hello', 'Z', 'X') |
|
||||
=============================
|
||||
Hello |
|
||||
|
||||
taos> select replace('Hello World', ' ', '_')
|
||||
replace('Hello World', ' ', '_') |
|
||||
===================================
|
||||
Hello_World |
|
||||
|
||||
taos> select replace('Hello World', 'World', 'MySQL')
|
||||
replace('Hello World', 'World', 'MySQL') |
|
||||
===========================================
|
||||
Hello MySQL |
|
||||
|
||||
taos> select replace('12345', '5', 'five')
|
||||
replace('12345', '5', 'five') |
|
||||
================================
|
||||
1234five |
|
||||
|
||||
taos> select replace('中国', '中', '国')
|
||||
replace('中国', '中', '国') |
|
||||
==================================
|
||||
国国 |
|
||||
|
||||
taos> select replace('é', 'e', 'a')
|
||||
replace('é', 'e', 'a') |
|
||||
==========================
|
||||
é |
|
||||
|
||||
taos> select replace('!@#', '@', '#')
|
||||
replace('!@#', '@', '#') |
|
||||
===========================
|
||||
!## |
|
||||
|
||||
taos> select replace('123456', '7', 'eight')
|
||||
replace('123456', '7', 'eight') |
|
||||
==================================
|
||||
123456 |
|
||||
|
||||
taos> select replace(concat('A', 'B', 'C'), 'B', 'Z')
|
||||
replace(concat('A', 'B', 'C'), 'B', 'Z') |
|
||||
===========================================
|
||||
AZC |
|
||||
|
||||
taos> select replace(upper('abc'), 'A', 'X')
|
||||
replace(upper('abc'), 'A', 'X') |
|
||||
==================================
|
||||
XBC |
|
||||
|
||||
taos> select replace(trim(' Hello '), 'l', 'L')
|
||||
replace(trim(' Hello '), 'l', 'L') |
|
||||
=======================================
|
||||
HeLLo |
|
||||
|
||||
taos> select replace(lower('HELLO'), 'h', 'H')
|
||||
replace(lower('HELLO'), 'h', 'H') |
|
||||
====================================
|
||||
Hello |
|
||||
|
||||
taos> select name, replace(substring(name, 1, 5), 'e', 'o') from ts_4893.meters limit 1
|
||||
name | replace(substring(name, 1, 5), 'e', 'o') |
|
||||
============================================================================
|
||||
lili | lili |
|
||||
|
||||
taos> select name, replace(name, 'a', 'o') from ts_4893.meters limit 1
|
||||
name | replace(name, 'a', 'o') |
|
||||
==================================================================
|
||||
lili | lili |
|
||||
|
||||
taos> select var1, replace(var1, '1', 'one') from ts_4893.meters limit 1
|
||||
var1 | replace(var1, '1', 'one') |
|
||||
==================================================================
|
||||
novel | novel |
|
||||
|
||||
taos> select nch1, replace(nch1, 'n', 'm') from ts_4893.meters limit 1
|
||||
nch1 | replace(nch1, 'n', 'm') |
|
||||
==================================================================
|
||||
novel | movel |
|
||||
|
|
|
@ -0,0 +1,310 @@
|
|||
|
||||
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 |
|
||||
|
|
|
@ -0,0 +1,275 @@
|
|||
|
||||
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.
|
|
@ -0,0 +1,138 @@
|
|||
|
||||
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 groupid, stddev_pop(voltage) from ts_4893.meters group by groupid
|
||||
groupid | stddev_pop(voltage) |
|
||||
======================================
|
||||
1 | 2.876459705957324 |
|
||||
|
||||
taos> select location, stddev_pop(current) from ts_4893.meters group by location
|
||||
location | stddev_pop(current) |
|
||||
=================================================
|
||||
beijing | 1.154339668872967 |
|
||||
|
||||
taos> select location, stddev_pop(voltage) from ts_4893.meters group by location
|
||||
location | stddev_pop(voltage) |
|
||||
=================================================
|
||||
beijing | 2.876459705957324 |
|
||||
|
||||
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 |
|
||||
|
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
|
@ -0,0 +1,798 @@
|
|||
|
||||
taos> select substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)
|
||||
substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2) |
|
||||
=====================================================
|
||||
1abcd;2abcd |
|
||||
|
||||
taos> select substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2)
|
||||
substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2) |
|
||||
======================================================
|
||||
3abcd;4abcd |
|
||||
|
||||
taos> select substring_index('www.taosdata.com','taos',1)
|
||||
substring_index('www.taosdata.com','taos',1) |
|
||||
===============================================
|
||||
www. |
|
||||
|
||||
taos> select substring_index('www.taosdata.com','taos',-1)
|
||||
substring_index('www.taosdata.com','taos',-1) |
|
||||
================================================
|
||||
data.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 1)
|
||||
substring_index('www.taosdata.com', '.', 1) |
|
||||
==============================================
|
||||
www |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -1)
|
||||
substring_index('www.taosdata.com', '.', -1) |
|
||||
===============================================
|
||||
com |
|
||||
|
||||
taos> select substring_index('www.taosdata.com','.',-2)
|
||||
substring_index('www.taosdata.com','.',-2) |
|
||||
=============================================
|
||||
taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 100)
|
||||
substring_index('www.taosdata.com', '.', 100) |
|
||||
================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -100)
|
||||
substring_index('www.taosdata.com', '.', -100) |
|
||||
=================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483647)
|
||||
substring_index('www.taosdata.com', '.', 2147483647) |
|
||||
=======================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483647)
|
||||
substring_index('www.taosdata.com', '.', -2147483647) |
|
||||
========================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483648)
|
||||
substring_index('www.taosdata.com', '.', 2147483648) |
|
||||
=======================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483648)
|
||||
substring_index('www.taosdata.com', '.', -2147483648) |
|
||||
========================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', 2147483649)
|
||||
substring_index('www.taosdata.com', '.', 2147483649) |
|
||||
=======================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> SELECT SUBSTRING_INDEX('www.taosdata.com', '.', -2147483649)
|
||||
substring_index('www.taosdata.com', '.', -2147483649) |
|
||||
========================================================
|
||||
www.taosdata.com |
|
||||
|
||||
taos> select substring_index('.taosdata.com','.',-2)
|
||||
substring_index('.taosdata.com','.',-2) |
|
||||
==========================================
|
||||
taosdata.com |
|
||||
|
||||
taos> select substring_index('.taosdata.com','.tcx',-1)
|
||||
substring_index('.taosdata.com','.tcx',-1) |
|
||||
=============================================
|
||||
.taosdata.com |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',2)
|
||||
substring_index('aaaaaaaaa1','aa',2) |
|
||||
=======================================
|
||||
aa |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',3)
|
||||
substring_index('aaaaaaaaa1','aa',3) |
|
||||
=======================================
|
||||
aaaa |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',4)
|
||||
substring_index('aaaaaaaaa1','aa',4) |
|
||||
=======================================
|
||||
aaaaaa |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',5)
|
||||
substring_index('aaaaaaaaa1','aa',5) |
|
||||
=======================================
|
||||
aaaaaaaaa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaa',2)
|
||||
substring_index('aaaaaaaaa1','aaa',2) |
|
||||
========================================
|
||||
aaa |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaa',3)
|
||||
substring_index('aaaaaaaaa1','aaa',3) |
|
||||
========================================
|
||||
aaaaaa |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaa',4)
|
||||
substring_index('aaaaaaaaa1','aaa',4) |
|
||||
========================================
|
||||
aaaaaaaaa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaaa',2)
|
||||
substring_index('aaaaaaaaa1','aaaa',2) |
|
||||
=========================================
|
||||
aaaa |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','1',1)
|
||||
substring_index('aaaaaaaaa1','1',1) |
|
||||
======================================
|
||||
aaaaaaaaa |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','a',-1)
|
||||
substring_index('aaaaaaaaa1','a',-1) |
|
||||
=======================================
|
||||
1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',-1)
|
||||
substring_index('aaaaaaaaa1','aa',-1) |
|
||||
========================================
|
||||
1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',-2)
|
||||
substring_index('aaaaaaaaa1','aa',-2) |
|
||||
========================================
|
||||
aa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',-3)
|
||||
substring_index('aaaaaaaaa1','aa',-3) |
|
||||
========================================
|
||||
aaaa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',-4)
|
||||
substring_index('aaaaaaaaa1','aa',-4) |
|
||||
========================================
|
||||
aaaaaa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aa',-5)
|
||||
substring_index('aaaaaaaaa1','aa',-5) |
|
||||
========================================
|
||||
aaaaaaaaa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaa',-1)
|
||||
substring_index('aaaaaaaaa1','aaa',-1) |
|
||||
=========================================
|
||||
1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaa',-2)
|
||||
substring_index('aaaaaaaaa1','aaa',-2) |
|
||||
=========================================
|
||||
aaa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaa',-3)
|
||||
substring_index('aaaaaaaaa1','aaa',-3) |
|
||||
=========================================
|
||||
aaaaaa1 |
|
||||
|
||||
taos> select substring_index('aaaaaaaaa1','aaa',-4)
|
||||
substring_index('aaaaaaaaa1','aaa',-4) |
|
||||
=========================================
|
||||
aaaaaaaaa1 |
|
||||
|
||||
taos> select substring_index('the king of thethe hill','the',-2)
|
||||
substring_index('the king of thethe hill','the',-2) |
|
||||
======================================================
|
||||
the hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill','the',-2)
|
||||
substring_index('the king of the the hill','the',-2) |
|
||||
=======================================================
|
||||
the hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill','the',-2)
|
||||
substring_index('the king of the the hill','the',-2) |
|
||||
========================================================
|
||||
the hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill',' the ',-1)
|
||||
substring_index('the king of the the hill',' the ',-1) |
|
||||
==========================================================
|
||||
hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill',' the ',-2)
|
||||
substring_index('the king of the the hill',' the ',-2) |
|
||||
==========================================================
|
||||
the hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill',' ',-1)
|
||||
substring_index('the king of the the hill',' ',-1) |
|
||||
======================================================
|
||||
hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill',' ',-2)
|
||||
substring_index('the king of the the hill',' ',-2) |
|
||||
======================================================
|
||||
the hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill',' ',-3)
|
||||
substring_index('the king of the the hill',' ',-3) |
|
||||
======================================================
|
||||
the hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill',' ',-4)
|
||||
substring_index('the king of the the hill',' ',-4) |
|
||||
======================================================
|
||||
the the hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill',' ',-5)
|
||||
substring_index('the king of the the hill',' ',-5) |
|
||||
======================================================
|
||||
of the the hill |
|
||||
|
||||
taos> select substring_index('the king of the.the hill','the',-2)
|
||||
substring_index('the king of the.the hill','the',-2) |
|
||||
=======================================================
|
||||
.the hill |
|
||||
|
||||
taos> select substring_index('the king of thethethe.the hill','the',-3)
|
||||
substring_index('the king of thethethe.the hill','the',-3) |
|
||||
=============================================================
|
||||
the.the hill |
|
||||
|
||||
taos> select substring_index('the king of thethethe.the hill','the',-1)
|
||||
substring_index('the king of thethethe.the hill','the',-1) |
|
||||
=============================================================
|
||||
hill |
|
||||
|
||||
taos> select substring_index('the king of the the hill','the',2)
|
||||
substring_index('the king of the the hill','the',2) |
|
||||
======================================================
|
||||
the king of |
|
||||
|
||||
taos> select substring_index('the king of the the hill','the',3)
|
||||
substring_index('the king of the the hill','the',3) |
|
||||
======================================================
|
||||
the king of the |
|
||||
|
||||
taos> select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) > 1 order by ts limit 5
|
||||
substring_index(nch1, nch2, 1) |
|
||||
=================================
|
||||
nov |
|
||||
a |
|
||||
一二三a |
|
||||
一二三 |
|
||||
p |
|
||||
|
||||
taos> select substring_index(nch1, nch2, 1) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
substring_index(nch1, nch2, 1) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) != 0 order by ts limit 5
|
||||
substring_index(nch1, nch2, -2) |
|
||||
==================================
|
||||
novel |
|
||||
c一二三abc |
|
||||
一二三abc |
|
||||
一二三四五六七八九十 |
|
||||
person |
|
||||
|
||||
taos> select substring_index(nch1, nch2, -2) from ts_4893.meters where position(nch2 in nch1) = 0 order by ts limit 5
|
||||
substring_index(nch1, nch2, -2) |
|
||||
==================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
|
||||
taos> select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) > 1 order by ts limit 5
|
||||
substring_index(var1, var2, 1) |
|
||||
=================================
|
||||
nov |
|
||||
plat |
|
||||
一二三 |
|
||||
ab |
|
||||
一二三a |
|
||||
|
||||
taos> select substring_index(var1, var2, 1) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
substring_index(var1, var2, 1) |
|
||||
=================================
|
||||
person |
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
|
||||
taos> select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) != 0 order by ts limit 5
|
||||
substring_index(var1, var2, -2) |
|
||||
==================================
|
||||
novel |
|
||||
plate |
|
||||
一二三abc |
|
||||
一二三123321三二一 |
|
||||
一二三abc |
|
||||
|
||||
taos> select substring_index(var1, var2, -2) from ts_4893.meters where position(var2 in var1) = 0 order by ts limit 5
|
||||
substring_index(var1, var2, -2) |
|
||||
==================================
|
||||
person |
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
|
||||
taos> select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) > 1 order by ts limit 5
|
||||
substring_index(nch1, var2, 1) |
|
||||
=================================
|
||||
nov |
|
||||
nov |
|
||||
ab |
|
||||
g |
|
||||
一二三 |
|
||||
|
||||
taos> select substring_index(nch1, var2, 1) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
substring_index(nch1, var2, 1) |
|
||||
=================================
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) != 0 order by ts limit 5
|
||||
substring_index(nch1, var2, -2) |
|
||||
==================================
|
||||
novel |
|
||||
novel |
|
||||
一二三abc |
|
||||
一二三123321三二一 |
|
||||
一二三abc |
|
||||
|
||||
taos> select substring_index(nch1, var2, -2) from ts_4893.meters where position(var2 in nch1) = 0 order by ts limit 5
|
||||
substring_index(nch1, var2, -2) |
|
||||
==================================
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
|
||||
taos> select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) > 1 order by ts limit 5
|
||||
substring_index(var1, nch2, 1) |
|
||||
=================================
|
||||
一二 |
|
||||
a |
|
||||
nov |
|
||||
up |
|
||||
p |
|
||||
|
||||
taos> select substring_index(var1, nch2, 1) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
substring_index(var1, nch2, 1) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) != 0 order by ts limit 5
|
||||
substring_index(var1, nch2, -2) |
|
||||
==================================
|
||||
一二三abc |
|
||||
c一二三abc |
|
||||
bc一二三abc |
|
||||
novel |
|
||||
update |
|
||||
|
||||
taos> select substring_index(var1, nch2, -2) from ts_4893.meters where position(nch2 in var1) = 0 order by ts limit 5
|
||||
substring_index(var1, nch2, -2) |
|
||||
==================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
|
||||
taos> select substring_index('a一二三a一二三bbcfp', nch2, 1) from ts_4893.meters where position(nch2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
|
||||
substring_index('a一二三a一二三bbcfp', nch2, 1) |
|
||||
========================================================
|
||||
a一二三a一二三bbc |
|
||||
a一二三a一二三bb |
|
||||
a |
|
||||
a |
|
||||
a一二三a一二三bb |
|
||||
|
||||
taos> select substring_index('a一二三a一二三bbcfp', nch2, -1) from ts_4893.meters where position(nch2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
|
||||
substring_index('a一二三a一二三bbcfp', nch2, -1) |
|
||||
=========================================================
|
||||
p |
|
||||
fp |
|
||||
二三bbcfp |
|
||||
bbcfp |
|
||||
fp |
|
||||
|
||||
taos> select substring_index('a一二三a一二三bbcfp', nch2, cast(id + 1 as int)) from ts_4893.meters where position(nch2 in 'a一二三a一二三bbcfp') = 0 order by ts limit 5
|
||||
substring_index('a一二三a一二三bbcfp', nch2, cast(id + 1 a |
|
||||
===================================================================
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
|
||||
taos> select substring_index('a一二三a一二三bbcfp', var2, 1) from ts_4893.meters where position(var2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
|
||||
substring_index('a一二三a一二三bbcfp', var2, 1) |
|
||||
========================================================
|
||||
a一二 |
|
||||
a一二三a一二三 |
|
||||
a一二三a一二三 |
|
||||
a一二三a一二三 |
|
||||
a |
|
||||
|
||||
taos> select substring_index('a一二三a一二三bbcfp', var2, -1) from ts_4893.meters where position(var2 in 'a一二三a一二三bbcfp') > 1 order by ts limit 5
|
||||
substring_index('a一二三a一二三bbcfp', var2, -1) |
|
||||
=========================================================
|
||||
一二三bbcfp |
|
||||
cfp |
|
||||
cfp |
|
||||
cfp |
|
||||
二三bbcfp |
|
||||
|
||||
taos> select substring_index('a一二三a一二三bbcfp', var2, cast(id + 1 as int)) from ts_4893.meters where position(var2 in 'a一二三a一二三bbcfp') = 0 order by ts limit 5
|
||||
substring_index('a一二三a一二三bbcfp', var2, cast(id + 1 a |
|
||||
===================================================================
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
a一二三a一二三bbcfp |
|
||||
|
||||
taos> select substring_index(nch1, '123', 1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
|
||||
substring_index(nch1, '123', 1) |
|
||||
==================================
|
||||
一二三 |
|
||||
一二三 |
|
||||
一二三 |
|
||||
一二三 |
|
||||
一二三 |
|
||||
|
||||
taos> select substring_index(nch1, '123', -1) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
|
||||
substring_index(nch1, '123', -1) |
|
||||
===================================
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
|
||||
taos> select substring_index(nch1, '123', id) from ts_4893.meters where position('123' in nch1) > 1 order by ts limit 5
|
||||
substring_index(nch1, '123', id) |
|
||||
===================================
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
|
||||
taos> select substring_index(var1, '123', 1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
|
||||
substring_index(var1, '123', 1) |
|
||||
==================================
|
||||
一二三 |
|
||||
一二三 |
|
||||
一二三 |
|
||||
一二三 |
|
||||
一二三 |
|
||||
|
||||
taos> select substring_index(var1, '123', -1) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
|
||||
substring_index(var1, '123', -1) |
|
||||
===================================
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
321三二一 |
|
||||
|
||||
taos> select substring_index(var1, '123', id) from ts_4893.meters where position('123' in var1) > 1 order by ts limit 5
|
||||
substring_index(var1, '123', id) |
|
||||
===================================
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
一二三123321三二一 |
|
||||
|
||||
taos> select substring_index('www.taosdata.com', '.', 2)
|
||||
substring_index('www.taosdata.com', '.', 2) |
|
||||
==============================================
|
||||
www.taosdata |
|
||||
|
||||
taos> select substring_index('www.taosdata.com', '.', -2)
|
||||
substring_index('www.taosdata.com', '.', -2) |
|
||||
===============================================
|
||||
taosdata.com |
|
||||
|
||||
taos> select substring_index('中国.科学.www.taosdata.com', '.', 2)
|
||||
substring_index('中国.科学.www.taosdata.com', '.', 2) |
|
||||
============================================================
|
||||
中国.科学 |
|
||||
|
||||
taos> select substring_index('北京。涛思。数据。科技', '。', 2)
|
||||
substring_index('北京。涛思。数据。科技', '。', 2) |
|
||||
=================================================================
|
||||
北京。涛思 |
|
||||
|
||||
taos> select substring_index(nch1, 'a', 2) from ts_4893.d0 order by ts limit 10
|
||||
substring_index(nch1, 'a', 2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
ag |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
ag |
|
||||
|
||||
taos> select substring_index(nch1, 'a', 2) from ts_4893.meters order by ts limit 10
|
||||
substring_index(nch1, 'a', 2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
ag |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
ag |
|
||||
|
||||
taos> select substring_index(nch1, nch2, 2) from ts_4893.d0 order by ts limit 10
|
||||
substring_index(nch1, nch2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select substring_index(nch1, nch2, 2) from ts_4893.meters order by ts limit 10
|
||||
substring_index(nch1, nch2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select substring_index(nch1, var2, 2) from ts_4893.d0 order by ts limit 10
|
||||
substring_index(nch1, var2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select substring_index(nch1, var2, 2) from ts_4893.meters order by ts limit 10
|
||||
substring_index(nch1, var2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
novel |
|
||||
novel |
|
||||
again |
|
||||
一二三四五六七八九十 |
|
||||
novel |
|
||||
again |
|
||||
|
||||
taos> select substring_index(var1, nch2, 2) from ts_4893.d0 order by ts limit 10
|
||||
substring_index(var1, nch2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select substring_index(var1, nch2, 2) from ts_4893.meters order by ts limit 10
|
||||
substring_index(var1, nch2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select substring_index(var1, var2, 2) from ts_4893.d0 order by ts limit 10
|
||||
substring_index(var1, var2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select substring_index(var1, var2, 2) from ts_4893.meters order by ts limit 10
|
||||
substring_index(var1, var2, 2) |
|
||||
=================================
|
||||
novel |
|
||||
person |
|
||||
novel |
|
||||
plate |
|
||||
一二三四五六七八九十 |
|
||||
update |
|
||||
prision |
|
||||
person |
|
||||
prision |
|
||||
plate |
|
||||
|
||||
taos> select substring_index(null, '.', 2)
|
||||
substring_index(null, '.', 2) |
|
||||
================================
|
||||
NULL |
|
||||
|
||||
taos> select substring_index('www.taosdata.com', null, 2)
|
||||
substring_index('www.taosdata.com', null, 2) |
|
||||
===============================================
|
||||
NULL |
|
||||
|
||||
taos> select substring_index('www.taosdata.com', '.', 0)
|
||||
substring_index('www.taosdata.com', '.', 0) |
|
||||
==============================================
|
||||
|
|
||||
|
||||
taos> select substring_index('www.taosdata.com', '.', null)
|
||||
substring_index('www.taosdata.com', '.', null) |
|
||||
=================================================
|
||||
NULL |
|
||||
|
||||
taos> select substring_index('a.b.c', '.', 1)
|
||||
substring_index('a.b.c', '.', 1) |
|
||||
===================================
|
||||
a |
|
||||
|
||||
taos> select substring_index('a.b.c', '.', 2)
|
||||
substring_index('a.b.c', '.', 2) |
|
||||
===================================
|
||||
a.b |
|
||||
|
||||
taos> select substring_index('a.b.c', '.', -1)
|
||||
substring_index('a.b.c', '.', -1) |
|
||||
====================================
|
||||
c |
|
||||
|
||||
taos> select substring_index('', '.', 1)
|
||||
substring_index('', '.', 1) |
|
||||
==============================
|
||||
|
|
||||
|
||||
taos> select substring_index('apple.orange.banana', '.', 2)
|
||||
substring_index('apple.orange.banana', '.', 2) |
|
||||
=================================================
|
||||
apple.orange |
|
||||
|
||||
taos> select substring_index('192.168.1.1', '.', 3)
|
||||
substring_index('192.168.1.1', '.', 3) |
|
||||
=========================================
|
||||
192.168.1 |
|
||||
|
||||
taos> select substring_index('abc@xyz.com', '.', 5)
|
||||
substring_index('abc@xyz.com', '.', 5) |
|
||||
=========================================
|
||||
abc@xyz.com |
|
||||
|
||||
taos> select substring_index('123456789', '.', 1)
|
||||
substring_index('123456789', '.', 1) |
|
||||
=======================================
|
||||
123456789 |
|
||||
|
||||
taos> select substring_index('abcdef', ' ', 2)
|
||||
substring_index('abcdef', ' ', 2) |
|
||||
====================================
|
||||
abcdef |
|
||||
|
||||
taos> select substring_index('ABCDEFG', '-', -1)
|
||||
substring_index('ABCDEFG', '-', -1) |
|
||||
======================================
|
||||
ABCDEFG |
|
||||
|
||||
taos> select substring_index('apple', '.', -3)
|
||||
substring_index('apple', '.', -3) |
|
||||
====================================
|
||||
apple |
|
||||
|
||||
taos> select substring_index(concat('apple', '.', 'orange', '.', 'banana'), '.', 2)
|
||||
substring_index(concat('apple', '.', 'orange', '.', 'banana'), ' |
|
||||
===================================================================
|
||||
apple.orange |
|
||||
|
||||
taos> select substring_index('apple.orange.banana', '.', length('apple'))
|
||||
substring_index('apple.orange.banana', '.', length('apple')) |
|
||||
===============================================================
|
||||
apple.orange.banana |
|
||||
|
||||
taos> select substring_index(upper('apple.orange.banana'), '.', 2)
|
||||
substring_index(upper('apple.orange.banana'), '.', 2) |
|
||||
========================================================
|
||||
APPLE.ORANGE |
|
||||
|
||||
taos> select substring_index(trim(' apple.orange.banana '), '.', 2)
|
||||
substring_index(trim(' apple.orange.banana '), '.', 2) |
|
||||
===========================================================
|
||||
apple.orange |
|
||||
|
||||
taos> select substring_index(concat('apple', '.', 'orange', '.', 'banana'), '.', 2)
|
||||
substring_index(concat('apple', '.', 'orange', '.', 'banana'), ' |
|
||||
===================================================================
|
||||
apple.orange |
|
||||
|
||||
taos> select substring_index('apple.orange.banana', '.', length('apple'))
|
||||
substring_index('apple.orange.banana', '.', length('apple')) |
|
||||
===============================================================
|
||||
apple.orange.banana |
|
||||
|
||||
taos> select substring_index(upper('apple.orange.banana'), '.', 2)
|
||||
substring_index(upper('apple.orange.banana'), '.', 2) |
|
||||
========================================================
|
||||
APPLE.ORANGE |
|
||||
|
||||
taos> select substring_index(trim(' apple.orange.banana '), '.', 2)
|
||||
substring_index(trim(' apple.orange.banana '), '.', 2) |
|
||||
===========================================================
|
||||
apple.orange |
|
||||
|
||||
taos> select name, substring_index(name, ' ', 1) from ts_4893.meters limit 1
|
||||
name | substring_index(name, ' ', 1) |
|
||||
==================================================================
|
||||
lili | lili |
|
||||
|
||||
taos> select var1, substring_index(var1, '-', -1) from ts_4893.meters limit 1
|
||||
var1 | substring_index(var1, '-', -1) |
|
||||
==================================================================
|
||||
novel | novel |
|
||||
|
||||
taos> select nch1, substring_index(nch1, ',', 3) from ts_4893.meters limit 1
|
||||
nch1 | substring_index(nch1, ',', 3) |
|
||||
==================================================================
|
||||
novel | novel |
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 30.
|
|
@ -0,0 +1,785 @@
|
|||
|
||||
taos> select TIMEDIFF(1,2)
|
||||
timediff(1,2) |
|
||||
========================
|
||||
-1000 |
|
||||
|
||||
taos> select TIMEDIFF(2,1)
|
||||
timediff(2,1) |
|
||||
========================
|
||||
1000 |
|
||||
|
||||
taos> select TIMEDIFF(1,2,1s)
|
||||
timediff(1,2,1s) |
|
||||
========================
|
||||
-1 |
|
||||
|
||||
taos> select TIMEDIFF(2,1,1s)
|
||||
timediff(2,1,1s) |
|
||||
========================
|
||||
1 |
|
||||
|
||||
taos> select TIMEDIFF(1,10000000,1m)
|
||||
timediff(1,10000000,1m) |
|
||||
==========================
|
||||
-166666 |
|
||||
|
||||
taos> select TIMEDIFF(10000000,1,1m)
|
||||
timediff(10000000,1,1m) |
|
||||
==========================
|
||||
166666 |
|
||||
|
||||
taos> select TIMEDIFF(1,10000000,1h)
|
||||
timediff(1,10000000,1h) |
|
||||
==========================
|
||||
-2777 |
|
||||
|
||||
taos> select TIMEDIFF(10000000,1,1h)
|
||||
timediff(10000000,1,1h) |
|
||||
==========================
|
||||
2777 |
|
||||
|
||||
taos> select TIMEDIFF(1,10000000,1d)
|
||||
timediff(1,10000000,1d) |
|
||||
==========================
|
||||
-115 |
|
||||
|
||||
taos> select TIMEDIFF(10000000,1,1d)
|
||||
timediff(10000000,1,1d) |
|
||||
==========================
|
||||
115 |
|
||||
|
||||
taos> select TIMEDIFF(1,10000000,1w)
|
||||
timediff(1,10000000,1w) |
|
||||
==========================
|
||||
-16 |
|
||||
|
||||
taos> select TIMEDIFF(10000000,1,1w)
|
||||
timediff(10000000,1,1w) |
|
||||
==========================
|
||||
16 |
|
||||
|
||||
taos> select TIMEDIFF(1724404450,1725095657)
|
||||
timediff(1724404450,1725095657) |
|
||||
==================================
|
||||
-691207000 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657,1724404450)
|
||||
timediff(1725095657,1724404450) |
|
||||
==================================
|
||||
691207000 |
|
||||
|
||||
taos> select TIMEDIFF(1724404450,1725095657,1s)
|
||||
timediff(1724404450,1725095657,1s) |
|
||||
=====================================
|
||||
-691207 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657,1724404450,1s)
|
||||
timediff(1725095657,1724404450,1s) |
|
||||
=====================================
|
||||
691207 |
|
||||
|
||||
taos> select TIMEDIFF(1724404450,1725095657,1m)
|
||||
timediff(1724404450,1725095657,1m) |
|
||||
=====================================
|
||||
-11520 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657,1724404450,1m)
|
||||
timediff(1725095657,1724404450,1m) |
|
||||
=====================================
|
||||
11520 |
|
||||
|
||||
taos> select TIMEDIFF(1724404450,1725095657,1h)
|
||||
timediff(1724404450,1725095657,1h) |
|
||||
=====================================
|
||||
-192 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657,1724404450,1h)
|
||||
timediff(1725095657,1724404450,1h) |
|
||||
=====================================
|
||||
192 |
|
||||
|
||||
taos> select TIMEDIFF(1724404450,1725095657,1d)
|
||||
timediff(1724404450,1725095657,1d) |
|
||||
=====================================
|
||||
-8 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657,1724404450,1d)
|
||||
timediff(1725095657,1724404450,1d) |
|
||||
=====================================
|
||||
8 |
|
||||
|
||||
taos> select TIMEDIFF(1724404450,1725095657,1w)
|
||||
timediff(1724404450,1725095657,1w) |
|
||||
=====================================
|
||||
-1 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657,1724404450,1w)
|
||||
timediff(1725095657,1724404450,1w) |
|
||||
=====================================
|
||||
1 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17')
|
||||
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17') |
|
||||
=========================================================
|
||||
-691200000 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17')
|
||||
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17') |
|
||||
=========================================================
|
||||
691200000 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s)
|
||||
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1s) |
|
||||
=============================================================
|
||||
-691200 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s)
|
||||
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1s) |
|
||||
=============================================================
|
||||
691200 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m)
|
||||
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1m) |
|
||||
=============================================================
|
||||
-11520 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m)
|
||||
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1m) |
|
||||
=============================================================
|
||||
11520 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h)
|
||||
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1h) |
|
||||
=============================================================
|
||||
-192 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h)
|
||||
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1h) |
|
||||
=============================================================
|
||||
192 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d)
|
||||
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1d) |
|
||||
=============================================================
|
||||
-8 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d)
|
||||
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1d) |
|
||||
=============================================================
|
||||
8 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w)
|
||||
timediff('2024-08-23 17:14:17', '2024-08-31 17:14:17', 1w) |
|
||||
=============================================================
|
||||
-1 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w)
|
||||
timediff('2024-08-31 17:14:17', '2024-08-23 17:14:17', 1w) |
|
||||
=============================================================
|
||||
1 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657)
|
||||
timediff('2024-08-23 17:14:17', 1725095657) |
|
||||
==============================================
|
||||
-691200000 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17')
|
||||
timediff(1725095657, '2024-08-23 17:14:17') |
|
||||
==============================================
|
||||
691200000 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1s)
|
||||
timediff('2024-08-23 17:14:17', 1725095657, 1s) |
|
||||
==================================================
|
||||
-691200 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1s)
|
||||
timediff(1725095657, '2024-08-23 17:14:17', 1s) |
|
||||
==================================================
|
||||
691200 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1m)
|
||||
timediff('2024-08-23 17:14:17', 1725095657, 1m) |
|
||||
==================================================
|
||||
-11520 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1m)
|
||||
timediff(1725095657, '2024-08-23 17:14:17', 1m) |
|
||||
==================================================
|
||||
11520 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1h)
|
||||
timediff('2024-08-23 17:14:17', 1725095657, 1h) |
|
||||
==================================================
|
||||
-192 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1h)
|
||||
timediff(1725095657, '2024-08-23 17:14:17', 1h) |
|
||||
==================================================
|
||||
192 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1d)
|
||||
timediff('2024-08-23 17:14:17', 1725095657, 1d) |
|
||||
==================================================
|
||||
-8 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1d)
|
||||
timediff(1725095657, '2024-08-23 17:14:17', 1d) |
|
||||
==================================================
|
||||
8 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-23 17:14:17', 1725095657, 1w)
|
||||
timediff('2024-08-23 17:14:17', 1725095657, 1w) |
|
||||
==================================================
|
||||
-1 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, '2024-08-23 17:14:17', 1w)
|
||||
timediff(1725095657, '2024-08-23 17:14:17', 1w) |
|
||||
==================================================
|
||||
1 |
|
||||
|
||||
taos> select TIMEDIFF(ts, ts) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, ts) |
|
||||
========================
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
0 |
|
||||
|
||||
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17') from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, '2024-08-31 17:14:17') |
|
||||
======================================
|
||||
-225095657000 |
|
||||
-225092657000 |
|
||||
-225089657000 |
|
||||
-225086657000 |
|
||||
-225083657000 |
|
||||
-225080657000 |
|
||||
-225077657000 |
|
||||
-225074657000 |
|
||||
-225071657000 |
|
||||
-225068657000 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', ts) from ts_4893.meters order by ts limit 10
|
||||
timediff('2024-08-31 17:14:17', ts) |
|
||||
======================================
|
||||
225095657000 |
|
||||
225092657000 |
|
||||
225089657000 |
|
||||
225086657000 |
|
||||
225083657000 |
|
||||
225080657000 |
|
||||
225077657000 |
|
||||
225074657000 |
|
||||
225071657000 |
|
||||
225068657000 |
|
||||
|
||||
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1s) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, '2024-08-31 17:14:17', 1s) |
|
||||
==========================================
|
||||
-225095657 |
|
||||
-225092657 |
|
||||
-225089657 |
|
||||
-225086657 |
|
||||
-225083657 |
|
||||
-225080657 |
|
||||
-225077657 |
|
||||
-225074657 |
|
||||
-225071657 |
|
||||
-225068657 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1s) from ts_4893.meters order by ts limit 10
|
||||
timediff('2024-08-31 17:14:17', ts, 1s) |
|
||||
==========================================
|
||||
225095657 |
|
||||
225092657 |
|
||||
225089657 |
|
||||
225086657 |
|
||||
225083657 |
|
||||
225080657 |
|
||||
225077657 |
|
||||
225074657 |
|
||||
225071657 |
|
||||
225068657 |
|
||||
|
||||
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1m) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, '2024-08-31 17:14:17', 1m) |
|
||||
==========================================
|
||||
-3751594 |
|
||||
-3751544 |
|
||||
-3751494 |
|
||||
-3751444 |
|
||||
-3751394 |
|
||||
-3751344 |
|
||||
-3751294 |
|
||||
-3751244 |
|
||||
-3751194 |
|
||||
-3751144 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1m) from ts_4893.meters order by ts limit 10
|
||||
timediff('2024-08-31 17:14:17', ts, 1m) |
|
||||
==========================================
|
||||
3751594 |
|
||||
3751544 |
|
||||
3751494 |
|
||||
3751444 |
|
||||
3751394 |
|
||||
3751344 |
|
||||
3751294 |
|
||||
3751244 |
|
||||
3751194 |
|
||||
3751144 |
|
||||
|
||||
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1h) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, '2024-08-31 17:14:17', 1h) |
|
||||
==========================================
|
||||
-62526 |
|
||||
-62525 |
|
||||
-62524 |
|
||||
-62524 |
|
||||
-62523 |
|
||||
-62522 |
|
||||
-62521 |
|
||||
-62520 |
|
||||
-62519 |
|
||||
-62519 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1h) from ts_4893.meters order by ts limit 10
|
||||
timediff('2024-08-31 17:14:17', ts, 1h) |
|
||||
==========================================
|
||||
62526 |
|
||||
62525 |
|
||||
62524 |
|
||||
62524 |
|
||||
62523 |
|
||||
62522 |
|
||||
62521 |
|
||||
62520 |
|
||||
62519 |
|
||||
62519 |
|
||||
|
||||
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1d) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, '2024-08-31 17:14:17', 1d) |
|
||||
==========================================
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2604 |
|
||||
-2604 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1d) from ts_4893.meters order by ts limit 10
|
||||
timediff('2024-08-31 17:14:17', ts, 1d) |
|
||||
==========================================
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2604 |
|
||||
2604 |
|
||||
|
||||
taos> select TIMEDIFF(ts, '2024-08-31 17:14:17', 1w) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, '2024-08-31 17:14:17', 1w) |
|
||||
==========================================
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
|
||||
taos> select TIMEDIFF('2024-08-31 17:14:17', ts, 1w) from ts_4893.meters order by ts limit 10
|
||||
timediff('2024-08-31 17:14:17', ts, 1w) |
|
||||
==========================================
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
|
||||
taos> select TIMEDIFF(ts, 1725095657) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, 1725095657) |
|
||||
===========================
|
||||
-225095657000 |
|
||||
-225092657000 |
|
||||
-225089657000 |
|
||||
-225086657000 |
|
||||
-225083657000 |
|
||||
-225080657000 |
|
||||
-225077657000 |
|
||||
-225074657000 |
|
||||
-225071657000 |
|
||||
-225068657000 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, ts) from ts_4893.meters order by ts limit 10
|
||||
timediff(1725095657, ts) |
|
||||
===========================
|
||||
225095657000 |
|
||||
225092657000 |
|
||||
225089657000 |
|
||||
225086657000 |
|
||||
225083657000 |
|
||||
225080657000 |
|
||||
225077657000 |
|
||||
225074657000 |
|
||||
225071657000 |
|
||||
225068657000 |
|
||||
|
||||
taos> select TIMEDIFF(ts, 1725095657, 1s) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, 1725095657, 1s) |
|
||||
===============================
|
||||
-225095657 |
|
||||
-225092657 |
|
||||
-225089657 |
|
||||
-225086657 |
|
||||
-225083657 |
|
||||
-225080657 |
|
||||
-225077657 |
|
||||
-225074657 |
|
||||
-225071657 |
|
||||
-225068657 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, ts, 1s) from ts_4893.meters order by ts limit 10
|
||||
timediff(1725095657, ts, 1s) |
|
||||
===============================
|
||||
225095657 |
|
||||
225092657 |
|
||||
225089657 |
|
||||
225086657 |
|
||||
225083657 |
|
||||
225080657 |
|
||||
225077657 |
|
||||
225074657 |
|
||||
225071657 |
|
||||
225068657 |
|
||||
|
||||
taos> select TIMEDIFF(ts, 1725095657, 1m) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, 1725095657, 1m) |
|
||||
===============================
|
||||
-3751594 |
|
||||
-3751544 |
|
||||
-3751494 |
|
||||
-3751444 |
|
||||
-3751394 |
|
||||
-3751344 |
|
||||
-3751294 |
|
||||
-3751244 |
|
||||
-3751194 |
|
||||
-3751144 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, ts, 1m) from ts_4893.meters order by ts limit 10
|
||||
timediff(1725095657, ts, 1m) |
|
||||
===============================
|
||||
3751594 |
|
||||
3751544 |
|
||||
3751494 |
|
||||
3751444 |
|
||||
3751394 |
|
||||
3751344 |
|
||||
3751294 |
|
||||
3751244 |
|
||||
3751194 |
|
||||
3751144 |
|
||||
|
||||
taos> select TIMEDIFF(ts, 1725095657, 1h) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, 1725095657, 1h) |
|
||||
===============================
|
||||
-62526 |
|
||||
-62525 |
|
||||
-62524 |
|
||||
-62524 |
|
||||
-62523 |
|
||||
-62522 |
|
||||
-62521 |
|
||||
-62520 |
|
||||
-62519 |
|
||||
-62519 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, ts, 1h) from ts_4893.meters order by ts limit 10
|
||||
timediff(1725095657, ts, 1h) |
|
||||
===============================
|
||||
62526 |
|
||||
62525 |
|
||||
62524 |
|
||||
62524 |
|
||||
62523 |
|
||||
62522 |
|
||||
62521 |
|
||||
62520 |
|
||||
62519 |
|
||||
62519 |
|
||||
|
||||
taos> select TIMEDIFF(ts, 1725095657, 1d) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, 1725095657, 1d) |
|
||||
===============================
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2605 |
|
||||
-2604 |
|
||||
-2604 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, ts, 1d) from ts_4893.meters order by ts limit 10
|
||||
timediff(1725095657, ts, 1d) |
|
||||
===============================
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2605 |
|
||||
2604 |
|
||||
2604 |
|
||||
|
||||
taos> select TIMEDIFF(ts, 1725095657, 1w) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, 1725095657, 1w) |
|
||||
===============================
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
-372 |
|
||||
|
||||
taos> select TIMEDIFF(1725095657, ts, 1w) from ts_4893.meters order by ts limit 10
|
||||
timediff(1725095657, ts, 1w) |
|
||||
===============================
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
372 |
|
||||
|
||||
taos> select timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s)
|
||||
timediff('2022-01-01 08:00:00', '2022-01-01 08:00:10',1s) |
|
||||
============================================================
|
||||
-10 |
|
||||
|
||||
taos> select timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s)
|
||||
timediff('2023-01-01 08:00:00', '2022-01-01 08:00:00',1s) |
|
||||
============================================================
|
||||
31536000 |
|
||||
|
||||
taos> select timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a)
|
||||
timediff('2022-01-01 08:00:03', '2022-01-01 08:00:00',1a) |
|
||||
============================================================
|
||||
3000 |
|
||||
|
||||
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m)
|
||||
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1m) |
|
||||
============================================================
|
||||
43200 |
|
||||
|
||||
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h)
|
||||
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1h) |
|
||||
============================================================
|
||||
720 |
|
||||
|
||||
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d)
|
||||
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1d) |
|
||||
============================================================
|
||||
30 |
|
||||
|
||||
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w)
|
||||
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00',1w) |
|
||||
============================================================
|
||||
4 |
|
||||
|
||||
taos> select timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00')
|
||||
timediff('2022-01-31 08:00:00', '2022-01-01 08:00:00') |
|
||||
=========================================================
|
||||
2592000000 |
|
||||
|
||||
taos> select timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s)
|
||||
timediff('2022-01-31 08:00:0', '2022-01-01 08:00:00',1s) |
|
||||
===========================================================
|
||||
2592000 |
|
||||
|
||||
taos> select timediff('2022-01-31', '2022-01-01',1s)
|
||||
timediff('2022-01-31', '2022-01-01',1s) |
|
||||
==========================================
|
||||
2592000 |
|
||||
|
||||
taos> select timediff(1720769589, 1720769529, 1s)
|
||||
timediff(1720769589, 1720769529, 1s) |
|
||||
=======================================
|
||||
60 |
|
||||
|
||||
taos> select timediff(1720769589, '2022-01-01 08:00:00', 1s)
|
||||
timediff(1720769589, '2022-01-01 08:00:00', 1s) |
|
||||
==================================================
|
||||
79774389 |
|
||||
|
||||
taos> select timediff(1720769589123, 1720769529123, 1s)
|
||||
timediff(1720769589123, 1720769529123, 1s) |
|
||||
=============================================
|
||||
60 |
|
||||
|
||||
taos> select timediff(1720769589231, '2022-01-01 08:00:00', 1s)
|
||||
timediff(1720769589231, '2022-01-01 08:00:00', 1s) |
|
||||
=====================================================
|
||||
79774389 |
|
||||
|
||||
taos> select timediff('2022-01-01 08:00:00', 1720769589, 1s)
|
||||
timediff('2022-01-01 08:00:00', 1720769589, 1s) |
|
||||
==================================================
|
||||
-79774389 |
|
||||
|
||||
taos> select timediff('2022-01-01 08:00:00', 1720769589123, 1s)
|
||||
timediff('2022-01-01 08:00:00', 1720769589123, 1s) |
|
||||
=====================================================
|
||||
-79774389 |
|
||||
|
||||
taos> select timediff(ts, 1720769589123, 1a) from ts_4893.d0 order by ts limit 10
|
||||
timediff(ts, 1720769589123, 1a) |
|
||||
==================================
|
||||
-220769589123 |
|
||||
-220766589123 |
|
||||
-220763589123 |
|
||||
-220760589123 |
|
||||
-220757589123 |
|
||||
-220754589123 |
|
||||
-220751589123 |
|
||||
-220748589123 |
|
||||
-220745589123 |
|
||||
-220742589123 |
|
||||
|
||||
taos> select timediff(ts, 1720769589123, 1a) from ts_4893.meters order by ts limit 10
|
||||
timediff(ts, 1720769589123, 1a) |
|
||||
==================================
|
||||
-220769589123 |
|
||||
-220766589123 |
|
||||
-220763589123 |
|
||||
-220760589123 |
|
||||
-220757589123 |
|
||||
-220754589123 |
|
||||
-220751589123 |
|
||||
-220748589123 |
|
||||
-220745589123 |
|
||||
-220742589123 |
|
||||
|
||||
taos> select timediff(null, '2022-01-01 08:00:01', 1s)
|
||||
timediff(null, '2022-01-01 08:00:01', 1s) |
|
||||
============================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('20220131', '20220101', 1s)
|
||||
timediff('20220131', '20220101', 1s) |
|
||||
=======================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('01/31/22', '01/01/22', 1s)
|
||||
timediff('01/31/22', '01/01/22', 1s) |
|
||||
=======================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('22/01/31', '22/01/01')
|
||||
timediff('22/01/31', '22/01/01') |
|
||||
===================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('22/01/31', '22/01/01', 1s)
|
||||
timediff('22/01/31', '22/01/01', 1s) |
|
||||
=======================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('31-JAN-22', '01-JAN-22', 1s)
|
||||
timediff('31-JAN-22', '01-JAN-22', 1s) |
|
||||
=========================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('2022/01/31', '2022/01/01', 1s)
|
||||
timediff('2022/01/31', '2022/01/01', 1s) |
|
||||
===========================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('2022-01-01 08:00:00', null, 1s)
|
||||
timediff('2022-01-01 08:00:00', null, 1s) |
|
||||
============================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('www', 'ttt')
|
||||
timediff('www', 'ttt') |
|
||||
=========================
|
||||
NULL |
|
||||
|
||||
taos> select timediff(ts, ts) from ts_4893.meters limit 1
|
||||
timediff(ts, ts) |
|
||||
========================
|
||||
0 |
|
||||
|
||||
taos> select timediff(ts, ts - 1d) from ts_4893.meters limit 1
|
||||
timediff(ts, ts - 1d) |
|
||||
========================
|
||||
86400000 |
|
||||
|
||||
taos> select timediff(ts, '00:00:00') from ts_4893.meters limit 1
|
||||
timediff(ts, '00:00:00') |
|
||||
===========================
|
||||
NULL |
|
||||
|
||||
taos> select timediff(ts, null) from ts_4893.meters limit 1
|
||||
timediff(ts, null) |
|
||||
========================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('25:61:61', ts) from ts_4893.meters limit 1
|
||||
timediff('25:61:61', ts) |
|
||||
===========================
|
||||
NULL |
|
||||
|
||||
taos> select timediff('invalid_format', ts) from ts_4893.meters limit 1
|
||||
timediff('invalid_format', ts) |
|
||||
=================================
|
||||
NULL |
|
||||
|
||||
taos> select timediff(name, ts) from ts_4893.meters limit 2
|
||||
timediff(name, ts) |
|
||||
========================
|
||||
NULL |
|
||||
NULL |
|
||||
|
||||
taos> select timediff('string_value', 'another_string') from ts_4893.meters limit 1
|
||||
timediff('string_value', 'another_string') |
|
||||
=============================================
|
||||
NULL |
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,343 @@
|
|||
|
||||
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 |
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
|
||||
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 groupid, var_pop(voltage) from ts_4893.meters group by groupid
|
||||
groupid | var_pop(voltage) |
|
||||
======================================
|
||||
1 | 8.274020439996093 |
|
||||
|
||||
taos> select location, var_pop(current) from ts_4893.meters group by location
|
||||
location | var_pop(current) |
|
||||
=================================================
|
||||
beijing | 1.332500071133751 |
|
||||
|
||||
taos> select location, var_pop(voltage) from ts_4893.meters group by location
|
||||
location | var_pop(voltage) |
|
||||
=================================================
|
||||
beijing | 8.274020439996093 |
|
||||
|
||||
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 |
|
||||
|
Can't render this file because it has a wrong number of fields in line 99.
|
|
@ -0,0 +1,565 @@
|
|||
|
||||
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
|
||||
groupid | sum(week(ts)) |
|
||||
==================================
|
||||
1 | 2669490 |
|
||||
|
|
|
@ -0,0 +1,272 @@
|
|||
|
||||
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(name) from ts_4893.meters limit 1
|
||||
weekday(name) |
|
||||
========================
|
||||
NULL |
|
||||
|
||||
taos> select weekday('9999-12-31')
|
||||
weekday('9999-12-31') |
|
||||
========================
|
||||
4 |
|
||||
|
||||
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
|
||||
groupid | sum(weekday(ts)) |
|
||||
==================================
|
||||
1 | 300007 |
|
||||
|
Can't render this file because it has a wrong number of fields in line 248.
|
|
@ -0,0 +1,267 @@
|
|||
|
||||
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(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('9999-12-31')
|
||||
weekofyear('9999-12-31') |
|
||||
===========================
|
||||
52 |
|
||||
|
||||
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
|
||||
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
|
||||
select location, avg(char_length(name)) from ts_4893.meters group 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
|
||||
|
|
|
@ -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 location, max(current) from ts_4893.meters group by location
|
||||
select location, max(id) from ts_4893.meters group by location
|
||||
select groupid, max(voltage) from ts_4893.meters group by groupid
|
||||
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
|
||||
|
|
|
@ -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 groupid, min(voltage) from ts_4893.meters group by groupid
|
||||
select location, min(current) from ts_4893.meters group by location
|
||||
select location, min(id) 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
|
||||
|
|
|
@ -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 groupid, stddev_pop(voltage) from ts_4893.meters group by groupid
|
||||
select location, stddev_pop(current) from ts_4893.meters group by location
|
||||
select location, stddev_pop(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
|
||||
|
|
|
@ -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 groupid, var_pop(voltage) from ts_4893.meters group by groupid
|
||||
select location, var_pop(current) from ts_4893.meters group by location
|
||||
select location, var_pop(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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(name) from ts_4893.meters limit 1
|
||||
select weekday('9999-12-31')
|
||||
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
|
||||
|
|
|
@ -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(name) from ts_4893.meters limit 1
|
||||
select weekofyear(ts) from ts_4893.meters limit 1
|
||||
select weekofyear('9999-12-31')
|
||||
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
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue