SESSION NAME: Sub Queries.

QUESTION NAME: Sub Query - 2.


TABLE DESCRIPTION:

Write a query to display the name ( first name and last
name ), salary, department id, job id for those employees
who works in the same designation as the employee
works whose id is 169.

Table name = sub_employees
Use Sub Queries

CODE:

SELECT first_name, last_name, salary, department_id, job_id FROM sub_employees  WHERE job_id =  ( SELECT job_id FROM sub_employees WHERE employee_id=169 );