SQL

Published on May 2017 | Categories: Documents | Downloads: 17 | Comments: 0 | Views: 192
of 2
Download PDF   Embed   Report

Comments

Content

apps/appsdt3@osivise
select * from emp;
select *from emp where job="Clerk";

select deptno, (sal*110/100) from emp where deptno=10
/
EPTNO (SAL*110/100)
----- ------------10
5500
10
2750
10
7150
10
5995
10
4730
select deptno,sum(sal) from emp group by deptno
/
EPTNO SUM(SAL)
----- ---------30
27400
20
19100
10
23750
select deptno,sum(sal) from emp group by deptno
/
DEPTNO SUM(SAL)
------ ---------30
27400
20
19100
10
23750
select deptno,count(*) from emp group by deptno
/
DEPTNO COUNT(*)
------ ---------30
6
20
4
10
5
select * from emp where deptno=10;
EMPNO ENAME
JOB
MGR
LAST_UPDA LAST_UPDATE_LO
----- ---------- --------- ------------------ ---7840 RING
MANAGER
7839
15-DEC-12
7256042
7369 SMITH
CLERK
7698
7839 KING
PRESIDENT

HIREDATE

SAL

COMM

DEPTNO

--------- ---------- ---------- ---------12-DEC-12

5000

2500

10

17-NOV-81

2500
6500

2500

10
10

7782 CLARK
MANAGER
7934 MILLER
CLERK
select distinct job from emp

7839 09-JUN-81
7782 23-JAN-82

5450
4300

130

10
10

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close