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

263 lines
7.8 KiB
Plaintext

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