Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

SQL> select employee_id,salary from employees where salary=2100 and

department_id='50';

EMPLOYEE_ID SALARY
----------- ----------
132 2100

SQL> select employee_id,salary from employees where salary=6500 and


department_id='40';

EMPLOYEE_ID SALARY
----------- ----------
203 6500

SQL> select employee_id,salary from employees where salary=8300 and


department_id='110';

EMPLOYEE_ID SALARY
----------- ----------
206 8300

SQL> select employee_id,salary from employees where salary=17000 and


department_id='90';

EMPLOYEE_ID SALARY
----------- ----------
101 17000
102 17000

SQL> select employee_id,salary from employees where salary=2500 and


department_id='30';

EMPLOYEE_ID SALARY
----------- ----------
119 2500

SQL> select employee_id,salary from employees where salary=10000 and


department_id='70';

EMPLOYEE_ID SALARY
----------- ----------
204 10000

SQL> select employee_id,salary from employees where salary=4400 and


department_id='10';

EMPLOYEE_ID SALARY
----------- ----------
200 4400

SQL> select employee_id,salary from employees where salary=6000 and


department_id='20';

EMPLOYEE_ID SALARY
----------- ----------
202 6000

SQL> select employee_id,salary from employees where salary=4200 and


department_id='60';
EMPLOYEE_ID SALARY
----------- ----------
107 4200

SQL> select employee_id,salary from employees where salary=6900 and


department_id='100';

EMPLOYEE_ID SALARY
----------- ----------
113 6900

SQL> select employee_id,salary from employees where salary=6100 and


department_id='80';

EMPLOYEE_ID SALARY
----------- ----------
173 6100

SQL> select department_id,min(salary)


2 from employees
3 group by department_id;

DEPARTMENT_ID MIN(SALARY)
------------- -----------
50 2100
40 6500
110 8300
90 17000
30 2500
70 10000
7000
10 4400
20 6000
60 4200
100 6900

DEPARTMENT_ID MIN(SALARY)
------------- -----------
80 6100

12 filas seleccionadas.

SQL> select department_id,min(salary)


2 from employees
3 group by department_id
4 order by department_id;

DEPARTMENT_ID MIN(SALARY)
------------- -----------
10 4400
20 6000
30 2500
40 6500
50 2100
60 4200
70 10000
80 6100
90 17000
100 6900
110 8300

DEPARTMENT_ID MIN(SALARY)
------------- -----------
7000

12 filas seleccionadas.

SQL> spool off

You might also like