Advertisement
apl-mhd

select ascd

Jun 30th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.38 KB | None | 0 0
  1. SELECT employees.EMPLOYEE_ID, employees.LAST_NAME, employees.DEPARTMENT_ID, employees.SALARY AS YEARLY_SALLARY FROM employees WHERE employees.DEPARTMENT_ID < 100 AND SALARY <6000 ORDER BY LAST_NAME DESC, SALARY ASC
  2.  
  3. SELECT DATE_FORMAT(HIRE_DATE, '%D %M, %Y')
  4. FROM employees
  5.  
  6. SELECT FIRST_NAME, round( datediff(CURRENT_DATE(), HIRE_DATE)/ 365,3) AS 'no of years'
  7.  
  8. FROM employees
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement