Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

This challenge is about finding second highest salary for each department

PLSQL Challenge 2 - Find the second highest salary for each department

A Solution

Nov 1 2011 8:12AM by sjb500   

;WITH m AS
(
	SELECT Department,MAX(Salary) ms FROM #PLC2_Employees a
	where Salary<(SELECT MAX(Salary) FROM #PLC2_Employees WHERE Department=a.department)
	GROUP BY Department
)
SELECT * FROM PLC2_Employees e
INNER JOIN m
ON e.Department=m.Department AND e.Salary=m.ms
ORDER BY 3

Tags:


sjb500
1217 · 0% · 20
2



Submit

1  Comments  

  • The object name "#PLC2Employees" is wrong . It should be PLC2Employees

    commented on Nov 3 2011 4:55AM
    Niladri Biswas
    7 · 21% · 6710

Your Comment


Sign Up or Login to post a comment.

"A Solution" rated 5 out of 5 by 2 readers
A Solution , 5.0 out of 5 based on 2 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]