<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11299398</id><updated>2024-03-07T03:20:50.506-06:00</updated><title type='text'>Quant Meditations</title><subtitle type='html'>Exploration of Oracle database embedded statistics, business analytics and data mining.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11299398.post-114943742081371650</id><published>2006-06-04T11:07:00.000-05:00</published><updated>2006-06-04T11:10:20.826-05:00</updated><title type='text'>What&#39;s next in easy-to-use BI?  Biggle</title><content type='html'>Interesting idea from &lt;a href=&quot;http://www.businessweek.com/technology/content/may2006/tc20060515_959175.htm&quot;&gt;Gartner&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;font-size:85%;&quot; &gt;What&#39;s next in easy-to-use business intelligence? Gartner has a concept it calls &quot;Biggle&quot; -- the intersection of BI and Google. The idea is that the data warehousing software will be so sophisticated that it understands when different people use different words to describe the same concepts or products. It creates an index of related information -- á là Google -- and dishes relevant results out in response to queries.&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;font-size:85%;&quot; &gt;In computer science, they refer to this capability as non-obvious relationship awareness. &quot;Nobody&#39;s doing this yet,&quot; says Gartner&#39;s Beyer. Judging from the speed of recent advances in business intelligence, though, it may not be long before companies add the term &quot;Biggling&quot; to their tech lexicon.  &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/114943742081371650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/114943742081371650?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/114943742081371650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/114943742081371650'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2006/06/whats-next-in-easy-to-use-bi-biggle.html' title='What&#39;s next in easy-to-use BI?  Biggle'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-112309983535830008</id><published>2005-08-03T13:55:00.000-05:00</published><updated>2005-10-25T07:53:19.766-05:00</updated><title type='text'>Web Databases &amp; Applications</title><content type='html'>During the dot-com boom, I used an online database creation and publishing service called &lt;a href=&quot;http://www.pcmag.com/article2/0,4149,351,00.asp&quot;&gt;Bitlocker&lt;/a&gt; to create a bug tracker for my &lt;a href=&quot;http://web.archive.org/web/19990505184826/www.hivetech.com/products.htm&quot;&gt;start-up&lt;/a&gt;.  At the time, we had 20 people using our Bitlocker based bug tracker spread over the US and India.&lt;br /&gt;&lt;br /&gt;Bitlocker was an unique product at the time. It allowed you to create a collaborative web-based application without a lot of programming. They provided templates for applications like CRM, bug tracking, recipe management, employee review tracking, etc. It was sort of like &lt;a href=&quot;http://www.filemaker.com/&quot;&gt;FileMaker Pro&lt;/a&gt; for the web for free!&lt;br /&gt;&lt;br /&gt;While Bitlocker was a WYSIWYG application, it exposed the underlying schema to the end-user and so you did need to know a little bit about databases to program with it. Also, modifying the structure or the UI was not simple and led to all sorts of data inconsistency issues.&lt;br /&gt;&lt;br /&gt;The service eventually failed for the same reason many other dot-com companies died. It wasn&#39;t profitable.&lt;br /&gt;&lt;br /&gt;Today, I think there are two interesting alternatives to Bitlocker.&lt;br /&gt;&lt;br /&gt;First, there is Oracle&#39;s &lt;a href=&quot;http://www.oracle.com/technology/products/database/htmldb/index.html&quot;&gt;HTML DB&lt;/a&gt;. HTML DB was originally Oracle&#39;s answer to Microsoft Access. But in reality, it is so much more. You can use it to build complex and scalable applications very quickly. It does require a fair amount programming ability (SQL &amp;amp; PL/SQL) to do anything complex. BTW., it is free if you own an Oracle database.&lt;br /&gt;&lt;br /&gt;Next there is &lt;a href=&quot;http://www.jotspot.com/&quot;&gt;JotSpot&lt;/a&gt;. JotSpot is very cool and simple. It is a web-based custom Wiki builder. You don&#39;t have to really think about data when you start building a JotSpot based application. It is ideal for collaborative tracking applications that involve unstructured data. BTW, it requires no programming skills.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/112309983535830008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/112309983535830008'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/08/web-databases-applications.html' title='Web Databases &amp; Applications'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-112308594582377488</id><published>2005-08-03T10:55:00.000-05:00</published><updated>2005-08-03T11:19:05.840-05:00</updated><title type='text'>The Long Tail - Overcoming the 80/20 Rule</title><content type='html'>&lt;a href=&quot;http://www.ventureblog.com/articles/indiv/2004/000907.html&quot;&gt;Venture Blog&lt;/a&gt; has a very interesting note on the 80/20 rule based on an article from &lt;a href=&quot;http://www.wired.com/wired/archive/12.10/tail.html?pg=1&amp;topic=tail&amp;amp;topic_set=&quot;&gt;Wired&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The basic premise is that the 80/20 rule is dictated by physical constraints. Those constraints are removed when we move to alternate models enabled by the web. For example, Barnes &amp; Nobles carries around 130,000 books based on what they believe will be the top selling books. On the other hand, 50% of Amazon&#39;s revenue comes books ranked lower than the top 130,000 books. Amazon does not have the same inventory constraints that Barnes &amp;amp; Nobles has and thus can carry many more books. Most of these don&#39;t sell many copies but each small sale adds up. This is the long tail.&lt;br /&gt;&lt;br /&gt;The same can apply to business intelligence. The trend today is to provide users with pre-built reports. There are only so many pre-built reports that can be provided economically by an IT organization. On the other hand, BI tools such as &lt;a href=&quot;http://www.oracle.com/technology/products/discoverer/index.html&quot;&gt;Oracle Discoverer&lt;/a&gt; have evolved so that they are simple to learn and use while at the same time can be delivered over the web and managed centrally. I believe that we are at a point, where IT organizations should really consider empowering their end-users with more capabilities and thus serving the long tail.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://www.wired.com/wired/archive/12.10/images/FF_170_tail2_f.gif&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;&quot; src=&quot;http://www.wired.com/wired/archive/12.10/images/FF_170_tail2_f.gif&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/112308594582377488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/112308594582377488?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/112308594582377488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/112308594582377488'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/08/long-tail-overcoming-8020-rule.html' title='The Long Tail - Overcoming the 80/20 Rule'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-112267190061602821</id><published>2005-07-29T16:13:00.000-05:00</published><updated>2005-07-29T16:18:20.623-05:00</updated><title type='text'>PL/SQL Market Basket Analysis</title><content type='html'>&lt;a href=&quot;http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10802/d_frqist.htm&quot;&gt;DBMS_FREQUENT_ITEMSET&lt;/a&gt; is the the PL/SQL package that powers Oracle Data Mining&#39;s Association Rules engine which is used for &lt;a href=&quot;http://www.megaputer.com/tech/wp/mba.php3&quot;&gt;market basket analysis&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This &lt;a href=&quot;http://technology.amis.nl/blog/index.php?p=214&quot;&gt;article&lt;/a&gt; by Lucas Jellema nicely outlines how to use this function.</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/112267190061602821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/112267190061602821?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/112267190061602821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/112267190061602821'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/07/plsql-market-basket-analysis.html' title='PL/SQL Market Basket Analysis'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-111378116111819931</id><published>2005-04-17T18:32:00.000-05:00</published><updated>2005-04-17T18:39:21.120-05:00</updated><title type='text'>SQL Regular Expressions</title><content type='html'>If you are a Perl, Python or Java developer, you already know the power of regular expressions. The good news is that Oracle 10g supports regular expressions. The syntax is slightly different from what you may have encountered before but it is very easy to adapt if you are already familiar with regular expression syntax.&lt;br /&gt;&lt;br /&gt;Here is a very simple example of extracting the domain name from an e-mail address.&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt; &lt;span style=&quot;font-family: courier new;&quot;&gt;select regexp_substr(&#39;sshah@whizdog.com&#39;, &#39;@([[:alnum:]]+[_|-|.]*[[:alnum:]]*)&#39;) from dual&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which results &#39;&lt;span style=&quot;font-family: courier new;&quot;&gt;@whizdog.com&lt;/span&gt;&#39; being returned.&lt;br /&gt;&lt;br /&gt;For more info, please read this excellent &lt;a href=&quot;http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/rischert_regexp_pt1.html&quot;&gt;article&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/111378116111819931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/111378116111819931?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111378116111819931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111378116111819931'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/04/sql-regular-expressions.html' title='SQL Regular Expressions'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-111155520544892552</id><published>2005-03-22T22:27:00.000-06:00</published><updated>2005-03-22T23:28:29.660-06:00</updated><title type='text'>Computing Interquartile Range</title><content type='html'>There are two ways of measuring the spread of a &lt;a href=&quot;http://quantmeditate.blogspot.com/2005/03/creating-histograms-using-sql-function.html&quot;&gt;data distribution&lt;/a&gt;.  &lt;a href=&quot;http://quantmeditate.blogspot.com/2005/03/computing-statistical-summaries-using.html&quot;&gt;Standard Deviation&lt;/a&gt; measures the spread of a data distribution from the mean and is thus influenced by outliers. Interquartile Range (IQR) measures the spread of a data distribution from the median and is thus not influenced by outliers.&lt;br /&gt;&lt;br /&gt;When you look at &lt;a href=&quot;http://exploringdata.cqu.edu.au/box_draw.htm&quot;&gt;boxplots&lt;/a&gt;, the box represents the IQR.&lt;br /&gt;&lt;br /&gt;The formula for IQR is simple:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-family:courier new;&quot; &gt;IQR = Q3 - Q1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where &lt;span style=&quot;font-style: italic;&quot;&gt;Q3&lt;/span&gt; is the 75th Quantile and &lt;span style=&quot;font-style: italic;&quot;&gt;Q1&lt;/span&gt; is the 25th Quantile. You can used the &lt;span style=&quot;font-style: italic;&quot;&gt;SUMMARY &lt;/span&gt;function provided by the PL/SQL package &lt;a href=&quot;http://quantmeditate.blogspot.com/2005/03/computing-statistical-summaries-using_14.html&quot;&gt;DBMS_STAT_FUNCS&lt;/a&gt; to compute Q3 and Q1. Unfortunately, the DBMS_STAT_FUNCS package does not provide a way to subset the data.&lt;br /&gt;&lt;br /&gt;So, today we will use SQL to compute &lt;span style=&quot;font-style: italic;&quot;&gt;Q3&lt;/span&gt; and &lt;span style=&quot;font-style: italic;&quot;&gt;Q1&lt;/span&gt;. First, divide the data set into a &lt;span style=&quot;font-style: italic;&quot;&gt;high &lt;/span&gt;and &lt;span style=&quot;font-style: italic;&quot;&gt;low &lt;/span&gt;group split at the median. &lt;span style=&quot;font-style: italic;&quot;&gt;Q3&lt;/span&gt; is the median of the high group and &lt;span style=&quot;font-style: italic;&quot;&gt;Q1&lt;/span&gt; is the median of the low group.&lt;br /&gt;&lt;br /&gt;The only catch is that if the data set has an odd number of values, we have to include the median of the entire data set in the &lt;span style=&quot;font-style: italic;&quot;&gt;high &lt;/span&gt;and &lt;span style=&quot;font-style: italic;&quot;&gt;low &lt;/span&gt;groups.&lt;br /&gt;&lt;br /&gt;I am going to use the Oracle sample &lt;a href=&quot;http://quantmeditate.blogspot.com/2005/03/whats-to-come-and-hr-data-set.html&quot;&gt;HR&lt;/a&gt; data set to illustrate IQR computation.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 1:&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;Compute the median of the data set and determine whether the number of elements in the data set is even or odd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;select median(salary),  mod(count(1), 2) as isOdd from employees&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The median salary is $6,200 and &lt;span style=&quot;font-style: italic;&quot;&gt;isOdd &lt;/span&gt;is 1 which means that we have an odd number values in our data set. There are 107 employees in this data set.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 2: Compute Q1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;select median(salary) as Q1 from employees where salary &lt;= 6200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If we had an even number of data values, we would do the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;select median(salary) as Q1 from employees where salary &lt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 3: Compute Q3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;select median(salary) as Q3 from employees where salary &gt;= 6200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If we had an even number of data values, we would do the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt; select median(salary) as Q3 from employees where salary &gt; 6200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 4: Compute IQR&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 2  and Step 3 result in a Q1 of $3,100 and a Q3 of $8,900. Thus,&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;IQR = Q3 - Q1 = 8900 - 3100 = 5800&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/111155520544892552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/111155520544892552?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111155520544892552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111155520544892552'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/03/computing-interquartile-range.html' title='Computing Interquartile Range'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-111136661679153881</id><published>2005-03-20T18:16:00.000-06:00</published><updated>2005-03-21T22:10:53.426-06:00</updated><title type='text'>Creating histograms using the SQL function WIDTH_BUCKET</title><content type='html'>Histograms are one of the mostly commonly used statistical tools for studying data distributions. Statistician use histograms to visualize the shape of the data set and determine if there are gaps or clusters in the data set.&lt;br /&gt;&lt;br /&gt;Histogram are actually just specialized bar charts. To construct a histogram, divide the data range into a number of equal width buckets and then count the number of data points in each bucket. The real art of creating a histogram is choosing the number of buckets. More on that later.&lt;br /&gt;&lt;br /&gt;Below is a histogram that shows the distribution of employee monthly salaries of the employees in the &lt;a href=&quot;http://quantmeditate.blogspot.com/2005/03/whats-to-come-and-hr-data-set.html&quot;&gt;HR&lt;/a&gt; table.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.whizdog.com/qmblog/images/histogram_032005_5927_image001.gif&quot; /&gt;&lt;br /&gt;&lt;br /&gt;This histogram has 11 data range buckets. The histogram tells us that most of our employees have monthly salaries between $2,100 and $4,290. We have no employees with monthly salaries between $17,430 and $24,000. We have one outlier employee (probably the CEO) who has a monthly salary greater than or equal to $24,000.&lt;br /&gt;&lt;br /&gt;So, let&#39;s assume we wanted to compute this histogram using Oracle SQL. Well, that&#39;s easy. Oracle provides a SQL function called &lt;span style=&quot;font-style: italic;&quot;&gt;WIDTH_BUCKET&lt;/span&gt; that tells us which bucket a data point belongs to.&lt;br /&gt;&lt;br /&gt;For example, the following snippet of SQL divides the HR schema employee monthly salary data range from $2,100 to $24,000 into 10 equal width buckets and assigns each data point to one of those buckets.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:courier new;font-size:85%;&quot;  &gt;select employee_id, salary, WIDTH_BUCKET(salary, 2100, 24000, 10) from employees&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thus, the width of each bucket will be (24,000 - 2,100)/10 = 2,190. The first bucket will range from $2,100 to $4,290. There are 46 employees that fall into this bucket. The data range for the buckets is inclusive at the low end and exclusive at the high end.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:courier new;font-size:85%;&quot;  &gt;select count(1) from employees where salary &gt;= 2100 and &amp;lt; 4590&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, comes the fun part. Let&#39;s use &lt;span style=&quot;font-style: italic;&quot;&gt;WIDTH_BUCKET&lt;/span&gt; to compute the distribution of employee salaries.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:courier new;font-size:85%;&quot;  &gt;&lt;br /&gt;select bucket, 2100+(bucket-1)*2190 as low, 2100+bucket*2190 as high , count(1) as cnt&lt;br /&gt;from&lt;br /&gt;(&lt;br /&gt;select width_bucket(salary, 2100, 24000, 10) as bucket from employees&lt;br /&gt;)&lt;br /&gt;group by bucket order by bucket&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;BUCKET        LOW       HIGH        CNT&lt;br /&gt;---------- ---------- ---------- ----------&lt;br /&gt;1            2100       4290         46&lt;br /&gt;2            4290       6480         10&lt;br /&gt;3            6480       8670         23&lt;br /&gt;4            8670      10860         15&lt;br /&gt;5           10860      13050          8&lt;br /&gt;6           13050      15240          2&lt;br /&gt;7           15240      17430          2&lt;br /&gt;11           24000      26190          1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Wait a minute, there are 11 buckets in the results but we only asked for 10 buckets. What happened? Remember that the lower bucket bound is inclusive and the upper bucket bound is exclusive. We have an employee that make $24,000 per month. He can&#39;t be counted in the $21,810 to $24,000 bucket. We have to add $24,000-$26,190 bucket to accommodate him. Oracle handles this automatically and creates a 11&lt;sup&gt;th&lt;/sup&gt; bucket even though we requested 10 buckets.&lt;br /&gt;&lt;br /&gt;I mentioned earlier that the choice of the number buckets influences the effectiveness of the histogram. There is no single best way for choosing the number of buckets. I recommend the following two heuristics.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:courier new;font-size:85%;&quot;  &gt;&lt;br /&gt;Number of buckets = 1 + 3.3 x log(N) for data sets which N &gt;= 15&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:courier new;font-size:85%;&quot;  &gt;&lt;br /&gt;Number of buckets = (max value - min value) / (2 x IQR x n&lt;sup&gt;1/3&lt;/sup&gt;)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;N&lt;/span&gt; is the number of data points in the data set.&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;IQR &lt;/span&gt;is the interquartile range. i.e. (75th quartile value - 25th quartile value). The 25th and 75th quartile values can be compute using &lt;span style=&quot;font-style: italic;&quot;&gt;DBMS_STATS_FUNC.SUMMARY&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;You can read &quot;&lt;a href=&quot;http://exploringdata.cqu.edu.au/wide_bin.htm&quot;&gt;How Wide is Your Bin&lt;/a&gt;&quot; for a good summary of different techniques for choosing the number of buckets. B.T.W., histogram buckets are also commonly referred to as &lt;span style=&quot;font-style: italic;&quot;&gt;bins&lt;/span&gt; by some people.&lt;br /&gt;&lt;br /&gt;This &lt;a href=&quot;http://www.stat.sc.edu/%7Ewest/javahtml/Histogram.html&quot;&gt;website&lt;/a&gt; has a Java applet that let&#39;s you vary the number of histogram buckets to see the effects on an histogram. It&#39;s definitely worth exploring.</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/111136661679153881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/111136661679153881?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111136661679153881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111136661679153881'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/03/creating-histograms-using-sql-function.html' title='Creating histograms using the SQL function WIDTH_BUCKET'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-111121322591487215</id><published>2005-03-19T00:18:00.000-06:00</published><updated>2005-03-19T00:32:41.113-06:00</updated><title type='text'>On a different note: The Universe Is A Strange Place</title><content type='html'>Worth checking out, Frank Wilczeck&#39;s talk on &lt;a href=&quot;http://web.mit.edu/nobel-lectures/&quot;&gt;strong force&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/111121322591487215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/111121322591487215?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111121322591487215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111121322591487215'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/03/on-different-note-universe-is-strange.html' title='On a different note: The Universe Is A Strange Place'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-111085890451150258</id><published>2005-03-14T21:38:00.000-06:00</published><updated>2005-03-14T21:58:00.330-06:00</updated><title type='text'>Computing Statistical Summaries using PL/SQL DBMS_STAT_FUNCS package</title><content type='html'>&lt;span style=&quot;font-family:arial;&quot;&gt;The PL/SQL &lt;span style=&quot;font-style: italic;&quot;&gt;DBMS_STAT_FUNCS&lt;/span&gt; package can be used to compute statistical summary of numerical column of a table.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The following PL/SQL code fragemnt summarizes employee salaries in the Oracle 10g HR schema.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;DECLARE&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   sigma number := 3;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   S   DBMS_STAT_FUNCS.summaryType;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   item number;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   cnt number;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt; BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_STAT_FUNCS.SUMMARY (&#39;hr&#39;, &#39;employees&#39;, &#39;salary&#39;, sigma, S);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;COUNT = &#39; || S.count);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;MIN = &#39; || S.min);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;MAX = &#39; || S.max);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;RANGE = &#39; || S.range);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;VARIANCE = &#39; || S.variance);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;STDDEV = &#39; || S.stddev);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;5th QUANTILE = &#39; || S.quantile_5);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;25th QUANTILE = &#39; || S.quantile_25);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;MEDIAN = &#39; || S.median);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;75th QUANTILE = &#39; || S.quantile_75);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;95th QUANTILE = &#39; || S.quantile_95);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;PLUS X SIGMA = &#39; || S.plus_x_sigma);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   DBMS_OUTPUT.PUT_LINE(&#39;MINUS X SIGMA = &#39; || S.minus_x_sigma);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   FOR item IN S.cmode.FIRST..S.cmode.LAST&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   LOOP&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    DBMS_OUTPUT.PUT_LINE(&#39;MODE [&#39; || item || &#39;] = &#39; || S.cmode(item));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   END LOOP;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   FOR item IN S.top_5_values.FIRST..S.top_5_values.LAST&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   LOOP&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    DBMS_OUTPUT.PUT_LINE(&#39;TOP &#39; || item || &#39; VALUE = &#39; || S.top_5_values(item));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   END LOOP;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   cnt := S.bottom_5_values.LAST;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   FOR item IN S.bottom_5_values.FIRST..S.bottom_5_values.LAST&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   LOOP&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    DBMS_OUTPUT.PUT_LINE(&#39;BOTTOM &#39; || cnt || &#39; VALUE = &#39; || S.bottom_5_values(item));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt; cnt := cnt - 1;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   END LOOP;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt; END;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: courier new;font-family:courier new;font-size:85%;&quot;  &gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;br /&gt;The &lt;span style=&quot;font-style: italic;&quot;&gt;DBMS_STAT_FUNCS.SUMMARY()&lt;/span&gt; function&#39;s argument signature is:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;DBMS_STAT_FUNCS.SUMMARY (&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   ownername    IN    VARCHAR2,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   tablename    IN    VARCHAR2,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   columnname   IN    VARCHAR2,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   sigma_value  IN    NUMBER DEFAULT 3,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   s           OUT    SummaryType);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;SummaryType &lt;/span&gt;is an object defined by the &lt;span style=&quot;font-style: italic;&quot;&gt;DBMS_STAT_FUNCS&lt;/span&gt; package. It&#39;s structure is:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;TYPE n_arr IS VARRAY(5) of NUMBER;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;TYPE num_table IS TABLE of NUMBER;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;TYPE summaryType IS RECORD (&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   count             NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   min               NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   max               NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   range             NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   mean              NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   cmode             num_table,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   variance          NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   stddev            NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   quantile_5        NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   quantile_25       NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   median            NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   quantile_75       NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   quantile_95       NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   plus_x_sigma      NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   minus_x_sigma     NUMBER,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   extreme_values    num_table,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   top_5_values      n_arr,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   bottom_5_values   n_arr);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The limitation of the &lt;span style=&quot;font-style: italic;&quot;&gt;DBMS_STAT_FUNCS.SUMMARY()&lt;/span&gt; function is that there is no way to subset the data. The&lt;span style=&quot;font-style: italic;&quot;&gt; SUMMARY()&lt;/span&gt; function computes the summary across all rows in the table for the specified column.&lt;br /&gt;&lt;br /&gt;The&lt;span style=&quot;font-style: italic;&quot;&gt; DBMS_STAT_FUNCS&lt;/span&gt; package also provides exponentional, normal, poisson, uniform and weibull distribution fitting functions. We will explore those in the future.&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/111085890451150258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/111085890451150258?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111085890451150258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111085890451150258'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/03/computing-statistical-summaries-using_14.html' title='Computing Statistical Summaries using PL/SQL DBMS_STAT_FUNCS package'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-111076879688213828</id><published>2005-03-13T20:31:00.000-06:00</published><updated>2005-03-13T22:23:57.206-06:00</updated><title type='text'>Computing Statistical Summaries using SQL Functions</title><content type='html'>&lt;span style=&quot;font-family:arial;&quot;&gt;We will be using the &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.oracle.com/technology/obe/obe9051jdev/common/files/b10771.pdf&quot;&gt;sample data sets&lt;/a&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; distributed with Oracle 10g for today&#39;s exercise. In particular we will be using the &lt;span style=&quot;font-style: italic;&quot;&gt;HR &lt;/span&gt;schema which is a very simple human resources data set that tracks information such as employee names, salaries, hire dates, managers and departments.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Our task is simple. We are going to analyze the salaries of employees in the HR schema.&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; Here is the structure of the employee table:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    &lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;create table (&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        employee_id number(6) not null,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        first_name varchar2(20),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        last_name varchar2(25) not null,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        email varchar2(25) not null,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        phone_number varchar2(20),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        hire_date date not null,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        job_id varchar2(10) not null,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        salary number(8,2),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        commission_pct number(2,2),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        manager_id number(6),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        department_id number(4)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;    );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;We can compute the minimum, maximum, count, median, mean, standard deviation and variance of salary across all employees simply by using Oracle SQL functions as show in the following SQL statement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    &lt;span style=&quot;font-size:85%;&quot;&gt;select min(salary), max(salary), count(salary),&lt;br /&gt;median(salary), stddev(salary), variance(salary) from employees&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:arial;font-size:100%;&quot;  &gt;which results in the following summary:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;table summary=&quot;Script output&quot; border=&quot;1&quot; width=&quot;90%&quot;&gt;  &lt;tbody&gt; &lt;tr align=&quot;center&quot;&gt; &lt;th scope=&quot;col&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-size:85%;&quot; &gt;M&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-size:85%;&quot; &gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;IN(SALARY) &lt;/span&gt;&lt;/span&gt;&lt;/th&gt; &lt;th  style=&quot;color: rgb(51, 51, 255);font-family:courier new;&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;MAX(SALARY) &lt;/span&gt;&lt;/th&gt; &lt;th  style=&quot;color: rgb(51, 51, 255);font-family:courier new;&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;COUNT(SALARY) &lt;/span&gt;&lt;/th&gt; &lt;th  style=&quot;color: rgb(51, 51, 255);font-family:courier new;&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;MEDIAN(SALARY) &lt;/span&gt;&lt;/th&gt; &lt;th  style=&quot;color: rgb(51, 51, 255);font-family:courier new;&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;STDDEV(SALARY) &lt;/span&gt;&lt;/th&gt; &lt;th scope=&quot;col&quot;  style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;VARIANCE(SALARY)&lt;/span&gt; &lt;/span&gt;&lt;/th&gt;&lt;/tr&gt; &lt;tr  style=&quot;font-family:courier new;&quot;&gt; &lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2100 &lt;/span&gt;&lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;24000 &lt;/span&gt;&lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;107 &lt;/span&gt;&lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6200 &lt;/span&gt;&lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;3909.36575 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;       &lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;15283140.5&lt;/span&gt;&lt;/div&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Now let&#39;s do something more interesting. Let&#39;s summarize by&lt;span style=&quot;font-style: italic;&quot;&gt; department id.&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;select department_id, min(salary), max(salary), count(salary),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;median(salary), stddev(salary), variance(salary) from employees group by department_id&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Of course, &lt;span style=&quot;font-style: italic;&quot;&gt;department ids&lt;/span&gt; are not very meaningful to us. We would rather have the data summarized by department name. We can create a nested query against the&lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;departments &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;and &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;employees &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;tables to do this.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;select department_name, min(salary), max(salary), &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;count(salary), median(salary), stddev(salary), variance(salary) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;from &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;(select department_name, salary from employees, departments &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;where&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;departments.department_id= employees.department_id)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;group by department_name&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;order by department_name&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;There is actually a much simpler way to compute the same summary using Oracle&#39;s analytical SQL extensions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;select distinct department_name, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;min(salary) over (partition by employees.department_id) as min, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;max(salary) over (partition by employees.department_id) as max, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;count(salary) over (partition by employees.department_id) as count, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;median(salary) over (partition by employees.department_id) as median, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;stddev(salary) over (partition by employees.department_id) as stddev, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;variance(salary) over (partition by employees.department_id) as variance&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;from &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;employees, departments &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;where&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;departments.department_id= employees.department_id&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;order by department_name&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Let&#39;s take a closer look at this query. The &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;PARTITION BY &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;clause breaks the entire data set into a set of groups such that each group has the same&lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt; department id&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;. Effectively, we have grouped the data by &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;department id&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;.&lt;br /&gt;&lt;br /&gt;The data set operated on by the PARTITION BY clause is defined by the &lt;span style=&quot;font-style: italic;&quot;&gt;WHERE &lt;/span&gt;clause of the query. The &lt;span style=&quot;font-style: italic;&quot;&gt;WHERE &lt;/span&gt;clause of the query will return all employees that have been assigned a department. (&lt;span style=&quot;font-style: italic;&quot;&gt;Note&lt;/span&gt;: Your HR data set may contain some entries for employees that do not belong to any department. These employees might be the executives).&lt;br /&gt;&lt;br /&gt;The query summarizes salary across each of the groups using the&lt;span style=&quot;font-style: italic;&quot;&gt; PARTITION BY&lt;/span&gt; clause. Thus, the query summarizes salary by &lt;span style=&quot;font-style: italic;&quot;&gt;department id&lt;/span&gt; for each employee.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Some readers may be wondering why we used the &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;DISTINCT &lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;clause. Without the distinct clause, the query would have returned a row for each employee with the data summarized by &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;department id&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;. The &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;DISTINCT&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; clause eliminates the duplicates and thus only returns the summaries for each department.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;table  summary=&quot;Script output&quot; border=&quot;1&quot; width=&quot;90%&quot; style=&quot;font-family:courier new;&quot;&gt; &lt;tbody&gt;&lt;tr&gt; &lt;th style=&quot;color: rgb(51, 51, 255);&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;DEPARTMENT_NAME &lt;/span&gt;&lt;/th&gt; &lt;th style=&quot;color: rgb(51, 51, 255);&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;MIN &lt;/span&gt;&lt;/th&gt; &lt;th style=&quot;color: rgb(51, 51, 255);&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;MAX &lt;/span&gt;&lt;/th&gt; &lt;th style=&quot;color: rgb(51, 51, 255);&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;COUNT &lt;/span&gt;&lt;/th&gt; &lt;th style=&quot;color: rgb(51, 51, 255);&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;MEDIAN &lt;/span&gt;&lt;/th&gt; &lt;th style=&quot;color: rgb(51, 51, 255);&quot; scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;STDDEV &lt;/span&gt;&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;VARIANCE&lt;/span&gt;&lt;/span&gt; &lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Accounting &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;8300 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;12000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;10150 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2616.29509 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6845000 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Administration &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4400 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4400 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;1 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4400 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;0 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;0 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Executive &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;17000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;24000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;3 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;17000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4041.45188 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;16333333.3 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Finance &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6900 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;12000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;8000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;1801.11077 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;3244000 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Human Resources &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6500 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6500 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;1 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6500 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;0 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;0 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;IT &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4200 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;9000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;5 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4800 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;1925.61678 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;3708000 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Marketing &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;13000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;9500 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4949.74747 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;24500000 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Public Relations &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;10000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;10000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;1 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;10000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;0 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;0 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Purchasing &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2500 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;11000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2850 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;3362.58829 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;11307000 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Sales &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;6100 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;14000 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;34 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;8900 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2033.6847 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;4135873.44 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Shipping &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2100 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;8200 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;45 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;3100 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;1488.00592 &lt;/span&gt;&lt;/td&gt; &lt;td align=&quot;right&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;2214161.62 &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantmeditate.blogspot.com/feeds/111076879688213828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11299398/111076879688213828?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111076879688213828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111076879688213828'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/03/computing-statistical-summaries-using.html' title='Computing Statistical Summaries using SQL Functions'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11299398.post-111023911727002856</id><published>2005-03-07T17:07:00.000-06:00</published><updated>2005-03-21T22:09:44.453-06:00</updated><title type='text'>What&#39;s to come and the HR data set</title><content type='html'>Over the next few months, I am going to explore the embedded statistical analysis capabilities of the Oracle database.&lt;br /&gt;&lt;br /&gt;Each week, I will explore a new Oracle statistical function using the &lt;a href=&quot;http://www.oracle.com/technology/products/oracle9i/htdocs/9iobe/OBE9i-Public/obe-in/html/sschema/sschema.htm&quot;&gt;HR schema&lt;/a&gt; that is part Oracle database sample schemas.&lt;br /&gt;&lt;br /&gt;From time to time, I may use my own dataset in which case, I will make that dataset downloadable.&lt;br /&gt;&lt;br /&gt;Have fun and feel free to write to &lt;a href=&quot;mailto:bluenileshah@yahoo.com&quot;&gt;me&lt;/a&gt; with your comments.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111023911727002856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11299398/posts/default/111023911727002856'/><link rel='alternate' type='text/html' href='http://quantmeditate.blogspot.com/2005/03/whats-to-come-and-hr-data-set.html' title='What&#39;s to come and the HR data set'/><author><name>whizdog</name><uri>http://www.blogger.com/profile/15724494910914900613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='http://www.whizdog.com/heartwalk3.jpg'/></author></entry></feed>