Skip to content

Commit 58739ed

Browse files
committed
Section 06 : Subqueries - part 04 - P7
1 parent 0b20bd9 commit 58739ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
SELECT d.Name AS Department, e1.Name AS Employee, e1.Salary
2+
FROM Employee e1
3+
JOIN Department d ON e1.departmentId = d.Id
4+
WHERE 3 > (SELECT COUNT(DISTINCT e2.Salary)
5+
FROM Employee e2
6+
WHERE e2.Salary > e1.Salary AND e1.DepartmentId = e2.DepartmentId
7+
)
8+
9+
10+
--

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy