SHARE
TWEET

Untitled

a guest Aug 25th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Select EMP_ID, F_NAME, L_NAME, SALARY from employees
  2. where SALARY < (select AVG(SALARY) from employees);
  3. select EMP_ID, SALARY,
  4. (select AVG(SALARY) from employees) AS AVG_SALARY from employees;
  5. select * from (select EMP_ID, F_NAME, L_NAME, DEP_ID from employees) AS EMP4ALL;
  6.  
  7. Select * from employees where DEP_ID IN
  8. (select DEPT_ID_DEP from departments);
  9.  
  10. Select * from employees where DEP_ID IN
  11. (select DEPT_ID_DEP from departments where LOC_ID='L0002');
  12.  
  13. Select DEPT_ID_DEP, DEP_NAME from departments
  14. where DEPT_ID_DEP IN
  15. (select DEP_ID from employees where salary > 70000);
  16.  
  17. select * from employees, departments;
  18.  
  19. Select * from employees, departments
  20. where employees.DEP_ID = departments.DEPT_ID_DEP;
  21.  
  22. Select * from employees E, departments D
  23. where E.DEP_ID = D.DEPT_ID_DEP;
  24.  
  25. Select employees.EMP_ID, departments.DEP_NAME
  26. from employees E, departments D
  27. where E.DEP_ID = D.DEPT_ID_DEP;
  28.  
  29. Select E.EMP_ID, D.DEP_NAME
  30. from employees E, departments D
  31. where E.DEP_ID = D.DEPT_ID_DEP;
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top