Professional Documents
Culture Documents
Vje - Ba 2 Uvod U SQL
Vje - Ba 2 Uvod U SQL
select *
from jobs;
select country_name
from countries;
select first_name,last_name,salary*12
from employees;
4. Ispišite sve radnike koji imaju plaću između 5000 i 10000 dolara
select first_name,last_name,salary
from employees
where salary between 5000 and 10000;
select *
from departments order by department_name;
select *
from employees
where department_id in(50,90);
8. Ispišite sve radnike koji imaju šifru posla ST_CLERK, a rade u odjelu sa šifrom 50
select first_name,last_name,job_id,department_id
from employees
where job_id like 'ST_CLERK' and department_id=50;
9. Ispišite sve radnike koji imaju skup znakova TH ili LL u svojoj e-mail adresi
select first_name,last_name,email
from employees
where email like '%TH%' or email like '%LL%';
select first_name,last_name
from employees
where manager_id is not null;
11. Ispišite ime i prezime radnika, te njihovu ukupnu mjesečnu zaradu. Ukupna mjesečna
zarada se sastoji od plaće i provizije.
12. Ispišite ime i prezime radnika, te njihovu ukupnu mjesečnu zaradu, sortiranu od
najveće vrijednosti prema najmanjoj.
select*
from employees
where hire_date like'%97';
14. Ispišite ime i prezime, te plaću i proviziju od svih radnika u prodaji (JOB_ID je
SA_MAN i SA_REP) kojima je plaća veća od provizije.