mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user