{"id":3618,"date":"2014-04-08T14:06:15","date_gmt":"2014-04-08T19:06:15","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=3618"},"modified":"2014-04-08T14:06:15","modified_gmt":"2014-04-08T19:06:15","slug":"oracle-analytic-functions-continue-to-exhibit-the-coolness-factor","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2014\/04\/08\/oracle-analytic-functions-continue-to-exhibit-the-coolness-factor\/","title":{"rendered":"Oracle analytic functions continue to exhibit the coolness factor"},"content":{"rendered":"<p>Sorry, but I never grow tired of these.  We wanted to know the average duration between an online shopper creating their cart and when they actually checked out.<\/p>\n<p>Analytic functions make this a snap.<\/p>\n<pre lang=\"sql\">\r\nselect min(gap), bucket\r\n  from (select submitted_date - creation_date gap,\r\n               ntile(20) over (order by submitted_date - creation_date) as bucket\r\n          from dcspp_order\r\n          where submitted_date is not null\r\n       )\r\n  group by bucket\r\n  order by 2\r\n\/\r\n<\/pre>\n<p>This provided 20 buckets with the minimum amount of time between a cart being created and when it was checked out.  Through this, we could see that 14 out of 20 buckets checked out in less than an hour.<\/p>\n<p>Coolness.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sorry, but I never grow tired of these. We wanted to know the average duration between an online shopper creating their cart and when they actually checked out. Analytic functions make this a snap. select min(gap), bucket from (select submitted_date&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2014\/04\/08\/oracle-analytic-functions-continue-to-exhibit-the-coolness-factor\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,22],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/3618"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3618"}],"version-history":[{"count":1,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/3618\/revisions"}],"predecessor-version":[{"id":3619,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/3618\/revisions\/3619"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3618"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}