<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Solomon &#187; nth Maximum</title>
	<atom:link href="http://www.ms.oyangudi.com/blog/tag/nth-maximum/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ms.oyangudi.com/blog</link>
	<description>from Oyangudi...</description>
	<lastBuildDate>Tue, 18 Oct 2011 02:38:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Find out the N&#8217;th maxium salary?</title>
		<link>http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/</link>
		<comments>http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 04:42:25 +0000</pubDate>
		<dc:creator>Solomon</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[nth Maximum]]></category>

		<guid isPermaLink="false">http://www.ms.oyangudi.com/blog/?p=28</guid>
		<description><![CDATA[Ans: find the 5th maxium salary: 1: SELECT TOP 1 * FROM tblEmployee WHERE E_Salary NOT IN 2: (SELECT DISTINCT TOP 4 E_Salary FROM tblEmployee ORDER BY E_Salary DESC) 3: ORDER BY E_Salary DESC]]></description>
			<content:encoded><![CDATA[<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="Find out the N&#8217;th maxium salary?" data-url="http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
<p><strong><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="nth-maximum" border="0" alt="nth-maximum" src="http://www.ms.oyangudi.com/blog/wp-content/uploads/FindouttheNthmaxiumsalary_14D2E/nthmaximum.gif" width="514" height="440" /> </strong></p>
<p><strong>Ans: find the 5<sup>th</sup> maxium salary: </strong></p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #0000ff">SELECT</span> <span style="color: #0000ff">TOP</span> 1 * <span style="color: #0000ff">FROM</span> tblEmployee <span style="color: #0000ff">WHERE</span> E_Salary <span style="color: #0000ff">NOT</span> <span style="color: #0000ff">IN</span> </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span>     (<span style="color: #0000ff">SELECT</span> <span style="color: #0000ff">DISTINCT</span> <span style="color: #0000ff">TOP</span> 4 E_Salary <span style="color: #0000ff">FROM</span> tblEmployee <span style="color: #0000ff">ORDER</span> <span style="color: #0000ff">BY</span> E_Salary <span style="color: #0000ff">DESC</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">ORDER</span> <span style="color: #0000ff">BY</span> E_Salary <span style="color: #0000ff">DESC</span></pre>
</p></div>
</div>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="nth-maximum-result" border="0" alt="nth-maximum-result" src="http://www.ms.oyangudi.com/blog/wp-content/uploads/FindouttheNthmaxiumsalary_14D2E/nthmaximumresult.gif" width="580" height="271" /></p>
<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="Find out the N&#8217;th maxium salary?" data-url="http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ms.oyangudi.com/blog/sql-server/find-out-the-n-th-maxium-salary/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

