Query List

1 min read

 Query List

 1. Query to display Employee Name, Job, Hire Date, Employee Number; for each employee with the Employee Number appearing first. 

 Query: 

               Select Eno, Ename, Job_type, Hire_date from EMPLOYEE; 

Output:

2. Query to display unique Jobs from the Employee Table. 

Query: 

 Select DISTINCT Job_type from EMPLOYEE; 

Output:

3. Query to display the Employee Name concatenated by a Job separated by a comma. 

Query: Select Ename||','|| Job_type from EMPLOYEE; 

Output: 

4. Query to display all the data from the Employee Table. Separate each Column by a comma and name the said column as THE_OUTPUT. 

Query: 

Select Eno||','||Ename||','||Job_type||','||Manager||','||Hire_date||','||Dno||','|| Commission||','||Salary AS "THE_OUTPUT" FROM EMPLOYEE; 

Output:

5. Query to display the Employee Name and Salary of all the employees earning more than ₹28500. 
Query: 

Select Ename, Salary from EMPLOYEE where Salary > 28500 or (Salary + Commission) > 28500;  

Output:












You may like these posts

  • Query List31. Query to display the Department Name, Location Name, No. of Employees and the average salary for all employees in that department.  Query 1: Select Dn…
  • Query List21. Query to display Name, Department Name and Department No for all the employees. Query: Select EMPLOYEE.Ename, DEPARTMENT.Dname, EMPLOYEE.Dno from EMPLOYEE …
  • Query List26. Query to display Name, Dept No. and Salary of any employee whose department No. and Salary match both the department no. and the salary of any employee who earns a …
  • Query List36. Query to display the department no, name and job for all employees in the Sales department.  Query: Select e.Dno, e.Ename, e.Job_type from EMPLOYEE e,…
  •  Query List46. List all the employees who joined before or after 1981. Query: Select * from employee where to_char(hire_date,'YYYY') not in ('1981'); (OR)Select…
  • Query List41. List the employees who joined on 25-JAN-81, 09-MAY-81, 05-NOV-81, 04- JUN-80 in asc order of seniority.  Query:Select * from employee where hire_date in ('2…

Post a Comment

© 2025DBMS. The Best Codder All rights reserved. Distributed by