Files
greptimedb/tests/cases/standalone/common/aggregate/count.sql
Ruihang Xia e6eca8ca0c fix: count_wildcard_to_time_index_rule doesn't handle table reference properly (#3847)
* validate time index col

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* use TableReference instead

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* add more tests

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2024-04-30 15:59:56 +00:00

20 lines
451 B
SQL

create table "HelloWorld" (a string, b timestamp time index);
insert into "HelloWorld" values ("a", 1) ,("b", 2);
select count(*) from "HelloWorld";
create table test (a string, "BbB" timestamp time index);
insert into test values ("c", 1) ;
select count(*) from test;
select count(*) from (select count(*) from test where a = 'a');
select count(*) from (select * from test cross join "HelloWorld");
drop table "HelloWorld";
drop table test;