JOINS INTERVIEW QUESTIONS
- List ename, job, annual sal,
deptno, dname who earn 30000 per year and who are not clerks
- List out the all employees by name
and employee number along with their manager's name and employee number
- Display ename,dname even if there
no employees working in a particular department.
- Display the department name along
with total salary in each department
- Display
employee name and department name for each employee
- Display location name of the
employee who earn commission.
- Display Dept name of the employee
who earn min salary and have no reporting manager.
- Display all the employees of Dept
30,10 with their annual salary and having at least 2 employees.
- list all the employees whose job is
same as scott and their salary greater than Jones.
- Display Dept name,loc of all the
employees who are reporting to Smith.
- List
all the Dept name and location of all the salesman manager's manager.
- list
employees who are working in research Dept and they are manager.
- Display
the number of employees who are getting salary less than the Blake's manager.
- list
the employee deptname and location of all the employees who are
analyst,reporting to Blake.
- Display
the employee names,hiredate,comm of Ford's manager
- Display ename, dname of all the
employees whose salary less than avg sal of dept 30
- Display ename dname and loc of all
the employees who are working for Jones
- Display ename dname of all the
employees whose name starts with S
- List the dname who are not having
any employee in it
- Display employee who are getting
same commission
- Display all Countries along with
the Regions .
- Display all Cities and the Country
it belongs.
- Display all Regions and their
respective Countries and Cities.
- Display
all Regions, Countries and Cities which are not belongs to Europe.
- Display
the region name of India.
- Display
all the Countries along with their Cities and also the countries doesn't have
Cities.
- Display
all employees first name and last name as 'employee name ' with their managers
first
- name
and last name as 'manager name ' and also the employees who doesn't have
manager.
- Display
all departments and the city to which it belongs.
- Display
cities doesn't have any departments.
- Display
all the Countries of America Region
- DISPLAY ALL THE DEPT NAMES IRRESPECTIVE OF ANY
EMPLOYEE WORKING IN IT OR NOT. IF AN EMPLOYEE IS WORKING DISPLAY HIS NAME.
- WRITE A QUERY TO DISPLAY EMPLOYEE NAME, JOB, DNAME,
LOCATION OF ALL EMPLOYEES WHO ARE WORKING AS ACTUAL MANAGERS AND WORKS AT
CHICAGO.
- LIST THE DEPARTMENT NAMES IN WHICH THE EMPLOYEES ARE
HIRED BETWEEN 1ST OF JAN 1981 AND 31ST DEC 1982 WITH SALARY MORE THAN 1800.
- DISPLAY 2ND LEAST SALARY FROM EMPLOYEE TABLE.
- LIST THE EMPLOYEES WHOSE ANNUAL SALARY IS GREATER THAN 1500 AND WHO ARE JOINED
BEFORE 1982 ONLY.
- DISPLAY DNAME, LOC, DEPTNO OF EMPLOYEES WHO HAS SAME
REPORTING MANAGER
- DISPLAY EMPLOYEE NAME ALONG WITH THEIR MANAGER NAME.
- DISPLAY EMPLOYEE NAME AND HIS DEPT NAME FOR THE
EMPLOYEES WHOSE NAME STARTS WITH ‘S’.
- DISPLAY EMPLOYEES WHO ARE GETTING SAME SALARY.
- Display all the employees whose job same as 'SMITH'
and department same as 'JONES' and salary more than 'SCOTT
- ASSIGNMENTS
ON EQUI-JOINS
- Display
all the managers & clerks who work in Accounts and Marketing departments.
- Display
all the salesmen who are not located at DALLAS.
- Select
department name & location of all the employees working for CLARK.
- Select all
the departmental information for all the managers
- Select all
the employees who work in DALLAS.
- ASSIGNMENTS
ON OUTER-JOINS
-
- Display all the departmental information for all the existing employees
and if a department has no employees display it as “No employees”.
- Get all the matching & non-matching records from both the tables.
- Get only the non-matching records from DEPT table (matching records
shouldn’t be selected).
- ASSIGNMENTS
ON SELF-JOINS
- Get all the employees who work in the same departments as of SCOTT
- Display all the employees who have joined before their managers.
- List all the employees who are earning more than their managers.
- Fetch all the employees who are earning same salaries.
- Select all the employees who are earning same as SMITH.
- Display employee name , his date of joining, his manager
name & his manager's date of joining.
- Select all the employees name along with their
manager names, and if an employee does not have a manager, display him as
“CEO”.