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

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