github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/table/temporary_table/various_test2.result (about) 1 drop table if exists t1; 2 create temporary table t1( 3 a bigint primary key auto_increment, 4 b varchar(10) 5 ); 6 insert into t1(b) values ('bbb'); 7 insert into t1 values (1, 'ccc'); 8 tae data: duplicate 9 insert into t1 values (3, 'ccc'); 10 insert into t1(b) values ('bbb1111'); 11 select * from t1 order by a; 12 a b 13 1 bbb 14 3 ccc 15 4 bbb1111 16 drop table if exists t1; 17 create temporary table t1( 18 a int, 19 b varchar(10) 20 ); 21 insert into t1 values (111, 'a'),(110, 'a'),(100, 'a'),(000, 'b'),(001, 'b'),(011,'b'); 22 select distinct b from t1; 23 b 24 a 25 b 26 select distinct b, a from t1; 27 b a 28 a 111 29 a 110 30 a 100 31 b 0 32 b 1 33 b 11 34 select count(distinct a) from t1; 35 count(distinct a) 36 6 37 select sum(distinct a) from t1; 38 sum(distinct a) 39 333 40 select avg(distinct a) from t1; 41 avg(distinct a) 42 55.5 43 select min(distinct a) from t1; 44 min(distinct a) 45 0 46 select max(distinct a) from t1; 47 max(distinct a) 48 111 49 drop table t1;