Oracle
- Write a query to display EName and Sal of Employees whose salary is greater than or equal to 3000 from table Emp.
- Write a Query to display employee name, salary and department number who are not getting commission from table Emp
- Write a Query to display employee Number, name, sal and sal*12 as Annual Salary whose commission is not NULL from table Emp.
- Write a Query to display employee name and salary of those employee who don’t have there salary in the range of 1500 to 2000
- Write a Query to display name, job, salary, and HireDate of employees who are hired between February 20, 1981, and May 1, 1981. Order the query in ascending order of HireDate.
- Write a Query to display the name and hire date of all employees who were hired in 1982
- Write a Query to display the name, job title and salary of employee who do not have manager.
- Write a Query to display the name of employee whose name contains ‘A’ as third alphabet.
- Write a Query to display the name of employee whose name contains ‘T’ as the last alphabet.
- Write a Query to display the name of employee whose name contains ‘M’ as first alphabet ‘L’ as third alphabet.
- Write a Query to display the name of employee who is having ‘L’ as any alphabet of the name.
- Write a query to display the current system date.
- Write a Query to display employee number, name, salary, salary increase by 15% expressed as a whole number. Label the column as New Salary.
- Write a Query to display the employee’s name and salary review date, which is the date after six months of HireDate.
- Write a Query to display the employee’s name and salary review date, which is the date after six months of HireDate in format of ‘Sunday, 7 SEP, 1981’.
- For each employee display employee name and total number of weeks lapsed between HireDate and Today.
- For each employee display employee name and total number of days lapsed between HireDate and Today.
- Create a query that produces display in the following format
Earns $ Monthly and working as - Write a query which displays the employee name with the first letter capitalized and all other letters lower case and length of there name string.
- Write a Query to to display the employee name and commission amount. If the employee does not earn commission, put “No Commission”. Display all the records (all columns) from table Emp.
- Display EmpNo and EName of all employees from table Emp.
- Display Ename, Sal and Sal added with Comm from table Emp.
- Display EName joined with Job with heading “Employee”, Sal*12 as “Total Salary” from table Emp.
- Display distinct Sal of employees from table Emp..
- Show the Structure of table Dept Write a query to display the EName and DeptNo and DName for all employees using tables Emp and Dept.
- Write a Query to display employee name, department name and location of all employees who have manager number between 7500 and 7900.
- Write a Query to display the employee name, department number and all the employees that worked in the same department as a given employee.
- Write a Query to display employee name and HireDate of employees who are employed after Employee ‘BLAKE’.
- Write a Query to display employee number, name and manager’s name with their manager number.
- Write a Query to Display the Sum, Average, Highest and Lowest salary of the employees.
- Write a Query to Display the Sum, Average, Highest and Lowest salary of the employees grouped by department number.
- Write a Query to Display the Sum, Average, Highest and Lowest salary of the employees grouped by department number and sub-grouped by job.
- Write a query to display the number of employee with same job.
- Write a query to display the average of Highest and lowest salary of each department.
- Write a query to display the difference of Highest and lowest salary of each department having maximum salary > 4000.
- Write a query to display the employee name and job for all employee in the same department as ‘ALLEN’
- Write a query to display employee name and salary of those who either work in department 10 or have salary greater than employee 7521.
