1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

A fix for bug #176

code cleanup
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2003-03-24 22:52:46 +02:00
parent 4b1a877b23
commit 8c36b3b4ec
4 changed files with 32 additions and 17 deletions

View File

@ -63,3 +63,10 @@ Fld1 max(Fld2)
1 20
3 50
drop table t1;
create table t1 (id int not null, qty int not null);
insert into t1 values (1,2),(1,3),(2,4),(2,5);
select id, sum(qty) as sqty from t1 group by id having sqty>2;
id sqty
1 5
2 9
drop table t1;

View File

@ -60,3 +60,7 @@ select Fld1, max(Fld2) from t1 group by Fld1 having max(Fld2) is not null;
select Fld1, max(Fld2) from t1 group by Fld1 having avg(Fld2) is not null;
select Fld1, max(Fld2) from t1 group by Fld1 having std(Fld2) is not null;
drop table t1;
create table t1 (id int not null, qty int not null);
insert into t1 values (1,2),(1,3),(2,4),(2,5);
select id, sum(qty) as sqty from t1 group by id having sqty>2;
drop table t1;