w3resource
SQL exercises

SQL Subquery Exercises: Display all the information of an employee whose salary and reporting person id is 3000 and 121 respectively

SQL SUBQUERY: Exercise-7 with Solution

Write a query to display all the information of an employee whose salary and reporting person id is 3000 and 121 respectively.

Sample table: employees


Sample Solution:

SELECT * 
FROM employees 
WHERE (salary,manager_id)=
(SELECT 3000,121);

Sample Output:

employee_id	first_name	last_name	email	phone_number	hire_date	job_id	salary	commission_pct	manager_id	department_id
187		Anthony		Cabrio		ACABRIO	650.509.4876	2007-02-07	SH_CLERK	3000.00	0.00	121		50

Practice Online


Query Visualization:

Duration:

Query visualization of Display all the information of an employee whose salary and reporting person id is 3000 and 121 respectively - Duration

Rows:

Query visualization of Display all the information of an employee whose salary and reporting person id is 3000 and 121 respectively - Rows

Cost:

Query visualization of Display all the information of an employee whose salary and reporting person id is 3000 and 121 respectively - Cost

Contribute your code and comments through Disqus.

Previous: Write a query to display the department number, name ( first name and last name ), job and department name for all employees in the Finance department.
Next: Write a statement to display all the information of an employee whose id is any of the number 134, 159 and 183.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming