SHARE
TWEET

PBD lab1

a guest Oct 10th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 3.
  2. SELECT e.first_name AS "numele", j.job_id || '             ' AS "identificatorul jobului", e.hire_date AS "data angajari", e.employee_id AS "identificatorul angajatului" FROM jobs j, employees e WHERE j.job_id = e.job_id;
  3.  
  4. 4.
  5. SELECT e.first_name || ', ' || e.job_id AS "Angajat_functie" FROM employees e;
  6.  
  7. 5.
  8. SELECT first_name, salary FROM employees WHERE salary > 5000;
  9.  
  10. 6.
  11. SELECT first_name, last_name, job_id, hire_date FROM employees WHERE last_name IN('Matos', 'Taylor') ORDER BY hire_date ASC;
  12.  
  13. 7.
  14. SELECT last_name, first_name FROM employees WHERE last_name LIKE '__a%';
  15.  
  16. 8.
  17. SELECT CURRENT_DATE || '  ' AS "Data_curenta" FROM dual;
  18.  
  19. 9.
  20. SELECT e.first_name, e.last_name, MONTHS_BETWEEN(jh.end_date, jh.start_date) AS "Luni_lucrate" FROM job_history jh, employees e WHERE e.employee_id = jh.employee_id;
  21.  
  22. 10.
  23. SELECT e.first_name, e.last_name, NVL(TO_CHAR(e.commission_pct), 'fara_comision') FROM employees e;
  24.  
  25. 11.
  26. SELECT COUNT(*), job_id FROM employees GROUP BY job_id;
  27.  
  28. 12.
  29. SELECT COUNT(DISTINCT manager_id) FROM employees;
  30.  
  31. 13.
  32. SELECT MAX(salary) - MIN(salary) Diferente_salariale FROM employees;
  33.  
  34. 14.
  35.  
  36.  
  37. 15.
  38. SELECT m.first_name || ' ' || m.last_name Muncitor, m.hire_date, man.first_name || ' ' || man.last_name Manager, man.hire_date FROM employees m, employees man WHERE m.manager_id = man.employee_id AND m.hire_date < man.hire_date;
  39.  
  40. 16.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top