8.2 KiB
8.2 KiB
| 1 | taos> select WEEKOFYEAR('2020-01-01 00:00:00') |
|---|---|
| 2 | weekofyear('2020-01-01 00:00:00') | |
| 3 | ==================================== |
| 4 | 1 | |
| 5 | taos> select WEEKOFYEAR('2020-01-01 00:00:00') from ts_4893.meters order by ts limit 10 |
| 6 | weekofyear('2020-01-01 00:00:00') | |
| 7 | ==================================== |
| 8 | 1 | |
| 9 | 1 | |
| 10 | 1 | |
| 11 | 1 | |
| 12 | 1 | |
| 13 | 1 | |
| 14 | 1 | |
| 15 | 1 | |
| 16 | 1 | |
| 17 | 1 | |
| 18 | taos> select WEEKOFYEAR('2021-01-01 00:00:00') |
| 19 | weekofyear('2021-01-01 00:00:00') | |
| 20 | ==================================== |
| 21 | 53 | |
| 22 | taos> select WEEKOFYEAR('2021-01-01 00:00:00') from ts_4893.meters order by ts limit 10 |
| 23 | weekofyear('2021-01-01 00:00:00') | |
| 24 | ==================================== |
| 25 | 53 | |
| 26 | 53 | |
| 27 | 53 | |
| 28 | 53 | |
| 29 | 53 | |
| 30 | 53 | |
| 31 | 53 | |
| 32 | 53 | |
| 33 | 53 | |
| 34 | 53 | |
| 35 | taos> select WEEKOFYEAR('1998-01-01 00:00:00') |
| 36 | weekofyear('1998-01-01 00:00:00') | |
| 37 | ==================================== |
| 38 | 1 | |
| 39 | taos> select WEEKOFYEAR('1998-01-01 00:00:00') from ts_4893.meters order by ts limit 10 |
| 40 | weekofyear('1998-01-01 00:00:00') | |
| 41 | ==================================== |
| 42 | 1 | |
| 43 | 1 | |
| 44 | 1 | |
| 45 | 1 | |
| 46 | 1 | |
| 47 | 1 | |
| 48 | 1 | |
| 49 | 1 | |
| 50 | 1 | |
| 51 | 1 | |
| 52 | taos> select WEEKOFYEAR('1998-12-31 00:00:00') |
| 53 | weekofyear('1998-12-31 00:00:00') | |
| 54 | ==================================== |
| 55 | 53 | |
| 56 | taos> select WEEKOFYEAR('1998-12-31 00:00:00') from ts_4893.meters order by ts limit 10 |
| 57 | weekofyear('1998-12-31 00:00:00') | |
| 58 | ==================================== |
| 59 | 53 | |
| 60 | 53 | |
| 61 | 53 | |
| 62 | 53 | |
| 63 | 53 | |
| 64 | 53 | |
| 65 | 53 | |
| 66 | 53 | |
| 67 | 53 | |
| 68 | 53 | |
| 69 | taos> select WEEKOFYEAR('2000-01-06 00:00:00') |
| 70 | weekofyear('2000-01-06 00:00:00') | |
| 71 | ==================================== |
| 72 | 1 | |
| 73 | taos> select WEEKOFYEAR('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10 |
| 74 | weekofyear('2000-01-06 00:00:00') | |
| 75 | ==================================== |
| 76 | 1 | |
| 77 | 1 | |
| 78 | 1 | |
| 79 | 1 | |
| 80 | 1 | |
| 81 | 1 | |
| 82 | 1 | |
| 83 | 1 | |
| 84 | 1 | |
| 85 | 1 | |
| 86 | taos> select WEEKOFYEAR(1725095657) |
| 87 | weekofyear(1725095657) | |
| 88 | ========================= |
| 89 | 4 | |
| 90 | taos> select WEEKOFYEAR(1725095657) from ts_4893.meters order by ts limit 10 |
| 91 | weekofyear(1725095657) | |
| 92 | ========================= |
| 93 | 4 | |
| 94 | 4 | |
| 95 | 4 | |
| 96 | 4 | |
| 97 | 4 | |
| 98 | 4 | |
| 99 | 4 | |
| 100 | 4 | |
| 101 | 4 | |
| 102 | 4 | |
| 103 | taos> select WEEKOFYEAR(ts) from ts_4893.meters order by ts limit 10 |
| 104 | weekofyear(ts) | |
| 105 | ======================== |
| 106 | 28 | |
| 107 | 28 | |
| 108 | 28 | |
| 109 | 28 | |
| 110 | 28 | |
| 111 | 28 | |
| 112 | 28 | |
| 113 | 28 | |
| 114 | 28 | |
| 115 | 28 | |
| 116 | taos> select weekofyear('2020-01-01') |
| 117 | weekofyear('2020-01-01') | |
| 118 | =========================== |
| 119 | 1 | |
| 120 | taos> select weekofyear(1721020666) |
| 121 | weekofyear(1721020666) | |
| 122 | ========================= |
| 123 | 4 | |
| 124 | taos> select weekofyear(1721020666229) |
| 125 | weekofyear(1721020666229) | |
| 126 | ============================ |
| 127 | 29 | |
| 128 | taos> select weekofyear(ts) from ts_4893.d0 order by ts limit 10 |
| 129 | weekofyear(ts) | |
| 130 | ======================== |
| 131 | 28 | |
| 132 | 28 | |
| 133 | 28 | |
| 134 | 28 | |
| 135 | 28 | |
| 136 | 28 | |
| 137 | 28 | |
| 138 | 28 | |
| 139 | 28 | |
| 140 | 28 | |
| 141 | taos> select weekofyear(ts) from ts_4893.meters order by ts limit 10 |
| 142 | weekofyear(ts) | |
| 143 | ======================== |
| 144 | 28 | |
| 145 | 28 | |
| 146 | 28 | |
| 147 | 28 | |
| 148 | 28 | |
| 149 | 28 | |
| 150 | 28 | |
| 151 | 28 | |
| 152 | 28 | |
| 153 | 28 | |
| 154 | taos> select weekofyear(null) |
| 155 | weekofyear(null) | |
| 156 | ======================== |
| 157 | NULL | |
| 158 | taos> select weekofyear('1721020591') |
| 159 | weekofyear('1721020591') | |
| 160 | =========================== |
| 161 | NULL | |
| 162 | taos> select weekofyear('1721020666229') |
| 163 | weekofyear('1721020666229') | |
| 164 | ============================== |
| 165 | NULL | |
| 166 | taos> select weekofyear('abc') |
| 167 | weekofyear('abc') | |
| 168 | ======================== |
| 169 | NULL | |
| 170 | taos> select weekofyear('01/01/2020') |
| 171 | weekofyear('01/01/2020') | |
| 172 | =========================== |
| 173 | NULL | |
| 174 | taos> select weekofyear('20200101') |
| 175 | weekofyear('20200101') | |
| 176 | ========================= |
| 177 | NULL | |
| 178 | taos> select weekofyear('20/01/01') |
| 179 | weekofyear('20/01/01') | |
| 180 | ========================= |
| 181 | NULL | |
| 182 | taos> select weekofyear('11/01/31') |
| 183 | weekofyear('11/01/31') | |
| 184 | ========================= |
| 185 | NULL | |
| 186 | taos> select weekofyear('01-JAN-20') |
| 187 | weekofyear('01-JAN-20') | |
| 188 | ========================== |
| 189 | NULL | |
| 190 | taos> select weekofyear('2024-02-29') |
| 191 | weekofyear('2024-02-29') | |
| 192 | =========================== |
| 193 | 9 | |
| 194 | taos> select weekofyear('2024-01-01') |
| 195 | weekofyear('2024-01-01') | |
| 196 | =========================== |
| 197 | 1 | |
| 198 | taos> select weekofyear('2024-12-31') |
| 199 | weekofyear('2024-12-31') | |
| 200 | =========================== |
| 201 | 1 | |
| 202 | taos> select weekofyear('9999-12-31') |
| 203 | weekofyear('9999-12-31') | |
| 204 | =========================== |
| 205 | 52 | |
| 206 | taos> select weekofyear(name) from ts_4893.meters limit 1 |
| 207 | weekofyear(name) | |
| 208 | ======================== |
| 209 | NULL | |
| 210 | taos> select weekofyear(ts) from ts_4893.meters limit 1 |
| 211 | weekofyear(ts) | |
| 212 | ======================== |
| 213 | 28 | |
| 214 | weekofyear(ts) | dayofweek(ts) | |
| 215 | ================================================ |
| 216 | 28 | 6 | |
| 217 | ====================================================== |
| 218 | 40 | |
| 219 | id | weekofyear(ts) | |
| 220 | ====================================== |
| 221 | 1 | 28 | |
| 222 | groupid | sum(weekofyear(ts)) | |
| 223 | ================================== |
| 224 | 1 | 2720120 | |