create  table   t1
(
        id      integer(10) unique index,
        text1   char(80),
 	int1    integer(10),
 	float1  float(10,2)
)       ;

insert into t1 values ( 1, 'one',   10, 42.12) ;
insert into t1 values ( 2, 'two',   10, 43.12) ;
insert into t1 values ( 3, 'three', 10, 44.12) ;
insert into t1 values ( 4, 'four',  50, 32.12) ;
insert into t1 values ( 5, 'five',  50, 32.13) ;
insert into t1 values ( 6, 'six',   50, 32.14) ;
insert into t1 values ( 7, 'seven', 50, 59.12) ;
insert into t1 values ( 8, 'eight', 30, 58.12) ;
insert into t1 values ( 9, 'nine',  30, 57.12) ;
insert into t1 values (10, 'ten',   30, 56.12) ;

select count(*) from t1 ;
select * from t1 ;
select * from t1 order by id ;
select * from t1 order by text1 ;
select * from t1 order by id desc ;
select * from t1 order by text1 desc ;

select * from t1 where id =  5 ;
select * from t1 where id != 5 ;
select * from t1 where id <  5 ;
select * from t1 where id <= 5 ;
select * from t1 where id >  5 ;
select * from t1 where id >= 5 ;
select * from t1 where id >= 7 or id <= 3 ;

select min(text1), sum(int1), sum(float1) from t1 group by int1;
select min(text1), sum(int1), sum(float1) from t1 group by int1 having sum(int1) > 100 ;

drop table t1 ;
