drop table temptable cascade constraints;
/*==============================================================*/
/* Table: temptable
*/
/*==============================================================*/
create table temptable(
tempID
INTEGER,
tempNum
number
);
SQL> insert into temptable values(1,20);
1 row inserted
SQL> insert into temptable values(1,30);
1 row inserted
SQL> insert into temptable values(1,40);
1 row inserted
SQL> insert into temptable values(2,40);
1 row inserted
SQL> insert into temptable values(2,10);
1 row inserted
SQL> insert into temptable values(2,600);
1 row inserted
SQL> insert into temptable values(3,30);
1 row inserted
SQL> insert into temptable values(3,30);
1 row inserted
SQL> insert into temptable values(3,10);
1 row inserted
SQL> insert into temptable values(4,500);
1 row inserted
select * from temptable
TEMPIDTEMPNUM
--------------------------------------- ----------
1 20
1 30
1 40
2 40
2 10
2600
3 30
3 30
3 10
4500
请问 如何求出以下结果
1 求和
2 求和
3 求和
4 求和
|