<?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; Get last five rows without ORDER BY	</title>
	<atom:link href="https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Tue, 07 Apr 2020 18:34:12 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>
		By: Tarash Jain		</title>
		<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/#comment-8208</link>

		<dc:creator><![CDATA[Tarash Jain]]></dc:creator>
		<pubDate>Tue, 07 Apr 2020 18:34:12 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7426#comment-8208</guid>

					<description><![CDATA[SELECT ID, name 
FROM
tbl_TestTop
HAVING ID&#062;(SELECT MAX(ID) FROM tbl_TestTop)- 5  ;]]></description>
			<content:encoded><![CDATA[<p>SELECT ID, name<br />
FROM<br />
tbl_TestTop<br />
HAVING ID&gt;(SELECT MAX(ID) FROM tbl_TestTop)- 5  ;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Honey Jain		</title>
		<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/#comment-8207</link>

		<dc:creator><![CDATA[Honey Jain]]></dc:creator>
		<pubDate>Tue, 07 Apr 2020 18:34:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7426#comment-8207</guid>

					<description><![CDATA[select * from tbl_TestTop
HAVING ID&#062;(select Max(ID) from tbl_TestTop) - 5;]]></description>
			<content:encoded><![CDATA[<p>select * from tbl_TestTop<br />
HAVING ID&gt;(select Max(ID) from tbl_TestTop) &#8211; 5;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nikhil Bhosale		</title>
		<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/#comment-7674</link>

		<dc:creator><![CDATA[Nikhil Bhosale]]></dc:creator>
		<pubDate>Wed, 14 Aug 2019 09:29:22 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7426#comment-7674</guid>

					<description><![CDATA[--------------------------------------------------------------------------
My Query is Write if the ID is Auto-Increment Field
--------------------------------------------------------------------------

Select Top 5 * 
from tbl_TestTop
Where ID NOT IN
(Select ID From tbl_TestTop where ID between (Select Min(ID)From tbl_TestTop)  AND (Select MAX(ID)-5From tbl_TestTop) )]]></description>
			<content:encoded><![CDATA[<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
My Query is Write if the ID is Auto-Increment Field<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Select Top 5 *<br />
from tbl_TestTop<br />
Where ID NOT IN<br />
(Select ID From tbl_TestTop where ID between (Select Min(ID)From tbl_TestTop)  AND (Select MAX(ID)-5From tbl_TestTop) )</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: HIC		</title>
		<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/#comment-6961</link>

		<dc:creator><![CDATA[HIC]]></dc:creator>
		<pubDate>Tue, 09 Apr 2019 18:11:39 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7426#comment-6961</guid>

					<description><![CDATA[SELECT * FROM tbl_TestTop
WHERE id &#062; (select max(id) from tbl_TestTop where ROWNUM &#060;= (select count(*) - 5 as id from tbl_TestTop));
   
SELECT * FROM tbl_TestTop
minus
select * from tbl_TestTop where ROWNUM &#060;= (select count(*) - 5 as id from tbl_TestTop);]]></description>
			<content:encoded><![CDATA[<p>SELECT * FROM tbl_TestTop<br />
WHERE id &gt; (select max(id) from tbl_TestTop where ROWNUM &lt;= (select count(*) &#8211; 5 as id from tbl_TestTop));</p>
<p>SELECT * FROM tbl_TestTop<br />
minus<br />
select * from tbl_TestTop where ROWNUM &lt;= (select count(*) &#8211; 5 as id from tbl_TestTop);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: sandeep		</title>
		<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/#comment-6842</link>

		<dc:creator><![CDATA[sandeep]]></dc:creator>
		<pubDate>Thu, 10 Jan 2019 12:27:14 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7426#comment-6842</guid>

					<description><![CDATA[select * from tbl_TestTop order by id OFFSET (SELECT COUNT(*)-5 FROM tbl_TestTop) ROWS FETCH NEXT 5 ROWS ONLY;]]></description>
			<content:encoded><![CDATA[<p>select * from tbl_TestTop order by id OFFSET (SELECT COUNT(*)-5 FROM tbl_TestTop) ROWS FETCH NEXT 5 ROWS ONLY;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nimit Gupta		</title>
		<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/#comment-6775</link>

		<dc:creator><![CDATA[Nimit Gupta]]></dc:creator>
		<pubDate>Sun, 11 Nov 2018 17:22:09 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7426#comment-6775</guid>

					<description><![CDATA[select * from tbl_TestTop offset 5 rows fetch next 5 rows only;]]></description>
			<content:encoded><![CDATA[<p>select * from tbl_TestTop offset 5 rows fetch next 5 rows only;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sai Reddy		</title>
		<link>https://www.dbrnd.com/2018/10/sql-puzzle-sql-advance-query-get-last-five-rows-without-order-by/#comment-6769</link>

		<dc:creator><![CDATA[Sai Reddy]]></dc:creator>
		<pubDate>Wed, 31 Oct 2018 09:26:07 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7426#comment-6769</guid>

					<description><![CDATA[SELECT * FROM tbl_TestTop WHERE ID&#062;(SELECT COUNT(*) FROM tbl_TestTop)-5]]></description>
			<content:encoded><![CDATA[<p>SELECT * FROM tbl_TestTop WHERE ID&gt;(SELECT COUNT(*) FROM tbl_TestTop)-5</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
