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

15 KiB

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