COMPILATION OF PROGRAMMING WEEK-1-TO-10

 PROGRAMMING

- SELECT employee_id, hire_date, TO_CHAR(hire_date,'Month') AS "Hired Month", job_id FROM employees

You want to generate the total salary per month of every department in the company.

-SELECT department_id, SUM(salary) FROM employees GROUP BY department_id

You want to display the employee's last name whose salary is below 10,000 and whose lastname starts with letter D. 

Which SQL statement give the required output format of the salary?

- SELECT last_name, TO_INTEGER(salary, $999,999.99) AS "MONTHLY SALARY" FROM employees WHERE salary < 10000 WHERE last_name IN 'D%'

SELECT last_name, TO_INTEGER(salary, $999,999.99) AS "MONTHLY SALARY" FROM employees WHERE salary < 10000 WHERE last_name IN 'D%'

- SELECT CONCAT(first_name, last_name) AS Fullname FROM employees

Read more >>