create table cc
(
aa int,
bb char(8)
)
insert into cc values(1,'dd')
insert into cc values(2,'dd')
insert into cc values(3,'dd')
insert into cc values(4,'dd')如果有个select sum(aa) from cc group by aa
得到的是
1
2
3
4
我想得到sum(aa) .......后面要有group by aa条件
(
aa int,
bb char(8)
)
insert into cc values(1,'dd')
insert into cc values(2,'dd')
insert into cc values(3,'dd')
insert into cc values(4,'dd')如果有个select sum(aa) from cc group by aa
得到的是
1
2
3
4
我想得到sum(aa) .......后面要有group by aa条件
select sum(aa) from cc
(
aa int,
bb char(8)
)
insert into cc values(1,'dd')
insert into cc values(1,'ss')
insert into cc values(2,'dd')
insert into cc values(3,'dd')
insert into cc values(4,'dd')select sum(aa),aa from cc group by aadrop table cc ??