You are on page 1of 1

Describe employees;

select EMPLOYEE_ID , FIRST_NAME , LAST_NAME , JOB_ID , HIRE_DATE as STARTDATE


from employees;

select distinct JOB_ID from employees;

select LAST_NAME ||' is a '|| JOB_ID as "Employee Details" from employees;

select EMPLOYEE_ID ||' , '|| FIRST_NAME ||' , '|| LAST_NAME ||' , '|| EMAIL ||' ,
'||
PHONE_NUMBER ||' , '|| HIRE_DATE ||' , '|| JOB_ID ||' , '|| SALARY ||' , '||
COMMISSION_PCT ||' , '|| MANAGER_ID ||' , '|| DEPARTMENT_ID as "THE_OUTPUT" from
employees;

select LAST_NAME , SALARY from employees where SALARY > 12000;

select LAST_NAME , JOB_ID from employees where EMPLOYEE_ID = 176;

select LAST_NAME , SALARY from employees where SALARY not between 5000 and 12000;

select LAST_NAME , JOB_ID , HIRE_DATE from employees where HIRE_DATE between '20-
FEB-08'
and '01-MAY-08'
order by HIRE_DATE;

select LAST_NAME , JOB_ID from EMPLOYEES where DEPARTMENT_ID in(20,50) order by


LAST_NAME;

select * from employees where DEPARTMENT_ID in (20,50) and SALARY between 5000 and
12000;

select LAST_NAME , HIRE_DATE from employees where HIRE_DATE between '01-JAN-08'


and '31-DEC-08';

select LAST_NAME , JOB_ID from employees where MANAGER_ID is null;

select LAST_NAME , SALARY , COMMISSION_PCT from employees where COMMISSION_PCT is


not null
order by SALARY desc , COMMISSION_PCT desc;

select LAST_NAME from employees where LAST_NAME like '__a%';

select LAST_NAME from employees where LAST_NAME like '%i%i%'


and (DEPARTMENT_ID =50 or MANAGER_ID=122);

You might also like