github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/table_func_generate_series.result (about) 1 select * from generate_series(1, 5) g; 2 result 3 1 4 2 5 3 6 4 7 5 8 select * from generate_series(5, 1) g; 9 result 10 5 11 4 12 3 13 2 14 1 15 select * from generate_series(1, 5, 2) g; 16 result 17 1 18 3 19 5 20 select * from generate_series(5, 1, -2) g; 21 result 22 5 23 3 24 1 25 select * from generate_series(1, 5, 0) g; 26 invalid input: step size cannot equal zero 27 select * from generate_series(1, 5, -1) g; 28 result 29 select * from generate_series(5, 1, 1) g; 30 result 31 select * from generate_series(2147483646, 2147483647,5) g; 32 result 33 2147483646 34 select * from generate_series(-2147483645, -2147483648,-2) g; 35 result 36 -2147483645 37 -2147483647 38 select * from generate_series(2147483647, 2147483649) g; 39 result 40 2147483647 41 2147483648 42 2147483649 43 select * from generate_series(2147483647, 2147483649, 2) g; 44 result 45 2147483647 46 2147483649 47 select * from generate_series(2147483649, 2147483647, -2) g; 48 result 49 2147483649 50 2147483647 51 select * from generate_series(2147483647, 2147483649, 0) g; 52 invalid input: step size cannot equal zero 53 select * from generate_series(2147483647, 2147483649, -1) g; 54 result 55 select * from generate_series(2147483649, 2147483647, 1) g; 56 result 57 select * from generate_series(9223372036854775806, 9223372036854775807) g; 58 result 59 9223372036854775806 60 9223372036854775807 61 select * from generate_series(9223372036854775806, 9223372036854775807, 2) g; 62 result 63 9223372036854775806 64 select * from generate_series(-9223372036854775805, -9223372036854775807) g; 65 result 66 -9223372036854775805 67 -9223372036854775806 68 -9223372036854775807 69 select * from generate_series(-9223372036854775805, -9223372036854775807,-2) g; 70 result 71 -9223372036854775805 72 -9223372036854775807 73 select * from generate_series(-9223372036854775805, cast(-9223372036854775808 as bigint),-2) g; 74 result 75 -9223372036854775805 76 -9223372036854775807 77 select * from generate_series('2020-02-28 00:00:00','2021-03-01 00:01:00', '1 year') g; 78 result 79 2020-02-28 00:00:00 80 2021-02-28 00:00:00 81 select * from generate_series('2020-02-29 00:00:00','2021-03-01 00:01:00', '1 year') g; 82 result 83 2020-02-29 00:00:00 84 2021-02-28 00:00:00 85 select * from generate_series('2020-02-29 00:00:00','2021-03-01 00:01:00', '1 quarter') g; 86 result 87 2020-02-29 00:00:00 88 2020-05-29 00:00:00 89 2020-08-29 00:00:00 90 2020-11-29 00:00:00 91 2021-02-28 00:00:00 92 select * from generate_series('2020-02-28 00:00:00','2021-03-01 00:01:00', '1 quarter') g; 93 result 94 2020-02-28 00:00:00 95 2020-05-28 00:00:00 96 2020-08-28 00:00:00 97 2020-11-28 00:00:00 98 2021-02-28 00:00:00 99 select * from generate_series('2020-02-29 00:00:00','2021-03-01 00:01:00', '1 month') g; 100 result 101 2020-02-29 00:00:00 102 2020-03-29 00:00:00 103 2020-04-29 00:00:00 104 2020-05-29 00:00:00 105 2020-06-29 00:00:00 106 2020-07-29 00:00:00 107 2020-08-29 00:00:00 108 2020-09-29 00:00:00 109 2020-10-29 00:00:00 110 2020-11-29 00:00:00 111 2020-12-29 00:00:00 112 2021-01-29 00:00:00 113 2021-02-28 00:00:00 114 select * from generate_series('2020-02-28 00:00:00','2021-03-01 00:01:00', '1 month') g; 115 result 116 2020-02-28 00:00:00 117 2020-03-28 00:00:00 118 2020-04-28 00:00:00 119 2020-05-28 00:00:00 120 2020-06-28 00:00:00 121 2020-07-28 00:00:00 122 2020-08-28 00:00:00 123 2020-09-28 00:00:00 124 2020-10-28 00:00:00 125 2020-11-28 00:00:00 126 2020-12-28 00:00:00 127 2021-01-28 00:00:00 128 2021-02-28 00:00:00 129 select * from generate_series('2020-02-29 00:00:00','2020-03-08 00:01:00', '1 week') g; 130 result 131 2020-02-29 00:00:00 132 2020-03-07 00:00:00 133 select * from generate_series('2000-01-01 00:00:00', '2000-01-05 00:00:00','1 day') g; 134 result 135 2000-01-01 00:00:00 136 2000-01-02 00:00:00 137 2000-01-03 00:00:00 138 2000-01-04 00:00:00 139 2000-01-05 00:00:00 140 select * from generate_series('2020-02-29 23:59:59','2020-03-01 00:01:00', '1 hour') g; 141 result 142 2020-02-29 23:59:59 143 select * from generate_series('2020-02-29 23:59:59','2020-03-01 00:01:00', '1 minute') g; 144 result 145 2020-02-29 23:59:59 146 2020-03-01 00:00:59 147 select * from generate_series('2020-02-29 23:59:59','2020-03-01 00:00:10', '1 second') g; 148 result 149 2020-02-29 23:59:59 150 2020-03-01 00:00:00 151 2020-03-01 00:00:01 152 2020-03-01 00:00:02 153 2020-03-01 00:00:03 154 2020-03-01 00:00:04 155 2020-03-01 00:00:05 156 2020-03-01 00:00:06 157 2020-03-01 00:00:07 158 2020-03-01 00:00:08 159 2020-03-01 00:00:09 160 2020-03-01 00:00:10 161 select * from generate_series('2020-02-29 23:59:59.124356','2020-02-29 23:59:59.124360', '1 microsecond') g; 162 result 163 2020-02-29 23:59:59.124356 164 2020-02-29 23:59:59.124357 165 2020-02-29 23:59:59.124358 166 2020-02-29 23:59:59.124359 167 2020-02-29 23:59:59.124360 168 select * from generate_series(5) g; 169 result 170 1 171 2 172 3 173 4 174 5 175 create table t(a int, b text); 176 insert into t select result, repeat('foobarzoo', 600) t from generate_series(1, 200000) t; 177 select count(*) as ttl from t; 178 ttl 179 200000 180 drop table t;