github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/table/temporary_table/various_test2.sql (about)

     1  -- test auto_increment as primary key
     2  drop table if exists t1;
     3  create temporary table t1(
     4  a bigint primary key auto_increment,
     5  b varchar(10)
     6  );
     7  insert into t1(b) values ('bbb');
     8  insert into t1 values (1, 'ccc');
     9  insert into t1 values (3, 'ccc');
    10  insert into t1(b) values ('bbb1111');
    11  select * from t1 order by a;
    12  
    13  -- test keyword distinct
    14  drop table if exists t1;
    15  create temporary table t1(
    16  a int,
    17  b varchar(10)
    18  );
    19  insert into t1 values (111, 'a'),(110, 'a'),(100, 'a'),(000, 'b'),(001, 'b'),(011,'b');
    20  select distinct b from t1;
    21  select distinct b, a from t1;
    22  select count(distinct a) from t1;
    23  select sum(distinct a) from t1;
    24  select avg(distinct a) from t1;
    25  select min(distinct a) from t1;
    26  select max(distinct a) from t1;
    27  drop table t1;