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

15 KiB

1taos> select POSITION('北' IN '北京涛思')
2position('北' in '北京涛思') |
3====================================
41 |
5taos> select POSITION('涛思' IN '北京涛思')
6position('涛思' in '北京涛思') |
7=======================================
83 |
9taos> select POSITION('a' IN 'abcd')
10position('a' in 'abcd') |
11==========================
121 |
13taos> select POSITION('e' IN 'abcd')
14position('e' in 'abcd') |
15==========================
160 |
17=========================================================
1814 |
19=========================================================
200 |
21========================================================
227 |
23taos> select POSITION('aaa' IN 'aaaaaaaaa')
24position('aaa' in 'aaaaaaaaa') |
25=================================
261 |
27=============================================================
281 |
29=============================================================
300 |
31taos> select POSITION(nch2 IN nch1) from ts_4893.meters where POSITION(nch2 IN nch1) != 0 order by ts limit 5
32position(nch2 in nch1) |
33=========================
344 |
352 |
365 |
374 |
382 |
39taos> select POSITION(nch2 IN nch1) from ts_4893.meters order by ts limit 5
40position(nch2 in nch1) |
41=========================
420 |
430 |
440 |
450 |
464 |
47taos> select POSITION(var2 IN var1) from ts_4893.meters where POSITION(var2 IN var1) != 0 order by ts limit 5
48position(var2 in var1) |
49=========================
504 |
515 |
524 |
531 |
543 |
55taos> select POSITION(var2 IN var1) from ts_4893.meters order by ts limit 5
56position(var2 in var1) |
57=========================
584 |
590 |
600 |
615 |
620 |
63taos> select POSITION(var2 IN nch1) from ts_4893.meters where POSITION(var2 IN nch1) != 0 order by ts limit 5
64position(var2 in nch1) |
65=========================
664 |
674 |
681 |
691 |
703 |
71taos> select POSITION(var2 IN nch1) from ts_4893.meters order by ts limit 5
72position(var2 in nch1) |
73=========================
744 |
750 |
760 |
770 |
780 |
79taos> select POSITION(nch2 IN var1) from ts_4893.meters where POSITION(nch2 IN var1) != 0 order by ts limit 5
80position(nch2 in var1) |
81=========================
823 |
832 |
841 |
854 |
863 |
87taos> select POSITION(nch2 IN var1) from ts_4893.meters order by ts limit 5
88position(nch2 in var1) |
89=========================
900 |
910 |
920 |
930 |
940 |
95taos> select POSITION('a' IN nch1) from ts_4893.meters where POSITION('a' IN nch1) != 0 order by ts limit 5
96position('a' in nch1) |
97========================
984 |
991 |
1001 |
1013 |
1021 |
103taos> select POSITION('a' IN var1) from ts_4893.meters where POSITION('a' IN var1) != 0 order by ts limit 5
104position('a' in var1) |
105========================
1063 |
1074 |
1083 |
1094 |
1104 |
111taos> select POSITION('一' IN nch1) from ts_4893.meters where POSITION('一' IN nch1) != 0 order by ts limit 5
112position('一' in nch1) |
113==========================
1141 |
1151 |
1164 |
1171 |
1181 |
119taos> select POSITION('一' IN var1) from ts_4893.meters where POSITION('一' IN var1) != 0 order by ts limit 5
120position('一' in var1) |
121==========================
1221 |
1231 |
1244 |
1251 |
1261 |
127taos> select POSITION(nch2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(nch2 IN 'abcdefghijklmn') != 0 order by ts limit 5
128position(nch2 in 'abcdefghijklmn') |
129=====================================
1306 |
1313 |
1325 |
1335 |
1344 |
135taos> select POSITION(var2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(var2 IN 'abcdefghijklmn') != 0 order by ts limit 5
136position(var2 in 'abcdefghijklmn') |
137=====================================
1385 |
1395 |
1402 |
1417 |
1422 |
143taos> select POSITION(nch2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(nch2 IN '一二三四五六七八九十') != 0 order by ts limit 5
144position(nch2 in '一二三四五六七八九十') |
145=====================================================
1464 |
1471 |
1481 |
1494 |
1501 |
151taos> select POSITION(var2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(var2 IN '一二三四五六七八九十') != 0 order by ts limit 5
152position(var2 in '一二三四五六七八九十') |
153=====================================================
1544 |
1551 |
1564 |
1574 |
1581 |
159taos> select ABS(POSITION('aaa' IN 'aaaaaaaaa'))
160abs(position('aaa' in 'aaaaaaaaa')) |
161======================================
1621 |
163=========================================
1641.000000000000000e+00 |
165taos> select position('t' in 'taos')
166position('t' in 'taos') |
167==========================
1681 |
169taos> select position('ustc' in 'taos')
170position('ustc' in 'taos') |
171=============================
1720 |
173taos> select position('' in '')
174position('' in '') |
175========================
1761 |
177taos> select position('' in 'taos')
178position('' in 'taos') |
179=========================
1801 |
181taos> select position(nch2 in nch1) from ts_4893.d0 order by ts limit 10
182position(nch2 in nch1) |
183=========================
1840 |
1850 |
1860 |
1870 |
1884 |
1890 |
1900 |
1910 |
1920 |
1930 |
194taos> select position(nch2 in nch1) from ts_4893.meters order by ts limit 10
195position(nch2 in nch1) |
196=========================
1970 |
1980 |
1990 |
2000 |
2014 |
2020 |
2030 |
2040 |
2050 |
2060 |
207taos> select position(nch2 in var1) from ts_4893.d0 order by ts limit 10
208position(nch2 in var1) |
209=========================
2100 |
2110 |
2120 |
2130 |
2140 |
2150 |
2160 |
2170 |
2180 |
2190 |
220taos> select position(nch2 in var1) from ts_4893.meters order by ts limit 10
221position(nch2 in var1) |
222=========================
2230 |
2240 |
2250 |
2260 |
2270 |
2280 |
2290 |
2300 |
2310 |
2320 |
233taos> select position(var2 in nch1) from ts_4893.d0 order by ts limit 10
234position(var2 in nch1) |
235=========================
2364 |
2370 |
2380 |
2390 |
2400 |
2410 |
2420 |
2430 |
2444 |
2450 |
246taos> select position(var2 in nch1) from ts_4893.meters order by ts limit 10
247position(var2 in nch1) |
248=========================
2494 |
2500 |
2510 |
2520 |
2530 |
2540 |
2550 |
2560 |
2574 |
2580 |
259taos> select position(var2 in var1) from ts_4893.d0 order by ts limit 10
260position(var2 in var1) |
261=========================
2624 |
2630 |
2640 |
2655 |
2660 |
2670 |
2680 |
2690 |
2700 |
2710 |
272taos> select position(var2 in var1) from ts_4893.meters order by ts limit 10
273position(var2 in var1) |
274=========================
2754 |
2760 |
2770 |
2785 |
2790 |
2800 |
2810 |
2820 |
2830 |
2840 |
285taos> select position('t' in null)
286position('t' in null) |
287========================
288NULL |
289taos> select position(null in 'taos')
290position(null in 'taos') |
291===========================
292NULL |
293taos> select position('' in 'A')
294position('' in 'A') |
295========================
2961 |
297taos> select position('A' in 'A')
298position('A' in 'A') |
299========================
3001 |
301taos> select position('A' in '')
302position('A' in '') |
303========================
3040 |
305taos> select position('A' in null)
306position('A' in null) |
307========================
308NULL |
309taos> select position('Z' in 'ABC')
310position('Z' in 'ABC') |
311=========================
3120 |
313taos> select position('l' in 'Hello')
314position('l' in 'Hello') |
315===========================
3163 |
317taos> select position('s' in 'meters')
318position('s' in 'meters') |
319============================
3206 |
321taos> select position('中' in '中国')
322position('中' in '中国') |
323==============================
3241 |
325taos> select position('e' in 'é')
326position('e' in 'é') |
327========================
3280 |
329taos> select position('W' in 'Hello World')
330position('W' in 'Hello World') |
331=================================
3327 |
333taos> select position('@' in '!@#')
334position('@' in '!@#') |
335=========================
3362 |
337taos> select position('6' in '12345')
338position('6' in '12345') |
339===========================
3400 |
341taos> select position('A' in trim(' A '))
342position('A' in trim(' A ')) |
343===============================
3441 |
345taos> select position('A' in upper('abc'))
346position('A' in upper('abc')) |
347================================
3481 |
349====================================
3502 |
351==============================================
3523 |
353name | position('e' in name) |
354=========================================================
355lili | 0 |
356==========================================================================
357lili | 0 |
358nch1 | position('n' in nch1) |
359=========================================================
360novel | 1 |
361var1 | position('1' in var1) |
362=========================================================
363novel | 0 |