<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL – RANK, MAX Analytical Functions, DECODE, SIGN</title>
	<atom:link href="http://hoopercharles.wordpress.com/2009/12/26/sql-%E2%80%93-rank-max-analytical-functions-decode-sign/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2009/12/26/sql-%e2%80%93-rank-max-analytical-functions-decode-sign/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Mon, 13 May 2013 14:10:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: http://etllabs.com/</title>
		<link>http://hoopercharles.wordpress.com/2009/12/26/sql-%e2%80%93-rank-max-analytical-functions-decode-sign/#comment-4372</link>
		<dc:creator><![CDATA[http://etllabs.com/]]></dc:creator>
		<pubDate>Sun, 05 Feb 2012 15:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=502#comment-4372</guid>
		<description><![CDATA[It’s very clean explanation with progressive teaching approach, nce explanation on  &lt;a href=&quot;http://etllabs.com/oracle/functions/oracle-decode-function/299/&quot; rel=&quot;nofollow&quot;&gt; Oracle Decode &lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>It’s very clean explanation with progressive teaching approach, nce explanation on  <a href="http://etllabs.com/oracle/functions/oracle-decode-function/299/" rel="nofollow"> Oracle Decode </a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2009/12/26/sql-%e2%80%93-rank-max-analytical-functions-decode-sign/#comment-54</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 27 Dec 2009 12:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=502#comment-54</guid>
		<description><![CDATA[Great idea, thanks for the suggestion.  I agree that the CASE structure is easier to understand (and maintain) than the equivalent DECODE structure in a SQL statement like the one used in this blog post.]]></description>
		<content:encoded><![CDATA[<p>Great idea, thanks for the suggestion.  I agree that the CASE structure is easier to understand (and maintain) than the equivalent DECODE structure in a SQL statement like the one used in this blog post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jametong</title>
		<link>http://hoopercharles.wordpress.com/2009/12/26/sql-%e2%80%93-rank-max-analytical-functions-decode-sign/#comment-53</link>
		<dc:creator><![CDATA[jametong]]></dc:creator>
		<pubDate>Sun, 27 Dec 2009 06:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=502#comment-53</guid>
		<description><![CDATA[for this type of question, I will prefer to user case instead of decode and sign..

[code]
SQL&gt; SELECT
  2    SYMBOL,
  3    MAX(ORDERS) OVER (PARTITION BY SYMBOL) ORDERS,
  4    TTIME TTIME,
  5    case
  6      when TTIME &gt;= 9450 and ttime &lt;= 15300 then 10
  7      else 1
  8    end extra_sort
  9  FROM
 10    T1;

S     ORDERS      TTIME EXTRA_SORT
- ---------- ---------- ----------
A          2       9300          1
A          2       9450         10
A          2      10300         10
A          2       9451         10
A          2      15300         10
A          2      17000          1
A          2      16000          1
B          4      16000          1
B          4       9300          1
C          3      16000          1

10 rows selected.
[/code]]]></description>
		<content:encoded><![CDATA[<p>for this type of question, I will prefer to user case instead of decode and sign..</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; SELECT
  2    SYMBOL,
  3    MAX(ORDERS) OVER (PARTITION BY SYMBOL) ORDERS,
  4    TTIME TTIME,
  5    case
  6      when TTIME &gt;= 9450 and ttime &lt;= 15300 then 10
  7      else 1
  8    end extra_sort
  9  FROM
 10    T1;

S     ORDERS      TTIME EXTRA_SORT
- ---------- ---------- ----------
A          2       9300          1
A          2       9450         10
A          2      10300         10
A          2       9451         10
A          2      15300         10
A          2      17000          1
A          2      16000          1
B          4      16000          1
B          4       9300          1
C          3      16000          1

10 rows selected.
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
