<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: SQL Puzzle: SQL Advance Query &#8211; Find second highest salary for each department	</title>
	<atom:link href="https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-find-second-highest-salary-for-each-department/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-find-second-highest-salary-for-each-department/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 06 Jan 2020 07:37:04 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>
		By: Tapan Patel		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-find-second-highest-salary-for-each-department/#comment-7993</link>

		<dc:creator><![CDATA[Tapan Patel]]></dc:creator>
		<pubDate>Mon, 06 Jan 2020 07:37:04 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5769#comment-7993</guid>

					<description><![CDATA[Hi,

If don&#039;t want to used the CTE then we will write a query live this.

select * from
(select *, rank() over(partition by DeptID order by EmpSalary desc) as rnk from Employee) as tbl1
where tbl1.rnk=2

it will returns same ans .]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>If don&#8217;t want to used the CTE then we will write a query live this.</p>
<p>select * from<br />
(select *, rank() over(partition by DeptID order by EmpSalary desc) as rnk from Employee) as tbl1<br />
where tbl1.rnk=2</p>
<p>it will returns same ans .</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
