Documente Academic
Documente Profesional
Documente Cultură
SELECT
deptno id_dep,
dname den_dep,
loc locatie
FROM dept; COPIE A DEPARTAMENTLUI dept cu numele departamente
SELECT
id_ang||'-'||nume angajat, --se concateneaza id cu nume intr-o coloana cu numele
angajat
functie,
data_ang
FROM angajati
SELECT
id_ang||'-'||nume angajat,
functie,
salariu+nvl(comision,0) AS "venit lunar",
' ' AS semnatura
FROM angajati
ORDER BY id_dep; Să se selecteze id-ul, numele, funcția și venitul lunar pentru
toți angajații din firmă. Să se adauge la select o coloană goală care să se
numească semnătura. Concatenați id-ul cu numele. Ordonați după departament.
SELECT nume, 'cu functie', functie FROM angajati; adauga o coloana 'cu functie'
SELECT
SELECT
id_dep departament,
functie,
nume,
data_ang AS "Data Angajarii"
FROM angajati
WHERE data_ang BETWEEN '1-MAY-1981' AND '31-DEC-1981'
ORDER BY 1, 2 DESC;
select * from angajati where data_ang <= '31-dec-81' and (comision is null or
comision = 0);
select * from angajati where id_sef is null and salariu > 3000 order by id_dep asc;
select nume, functie, (salariu+nvl(comision, 0))*12 as "salariu anual" from
angajati where lower(functie)!='manager' and id_dep = 20;
select id_dep, nume, data_ang, salariu from angajati where data_ang like '%81' and
id_dep in(10, 20);