Re: build a query

From: Andreas Mosmann <mosmann_at_expires-31-08-2011.news-group.org>
Date: Thu, 18 Aug 2011 14:46:48 +0200
Message-ID: <1313671608.78_at_user.newsoffice.de>



ddf schrieb am 18.08.2011 in
<d6e122f6-d480-4ecc-a6d1-0cff4d33e974_at_bl1g2000vbb.googlegroups.com>:

> SQL> select ref, prev_loc, location, prev_loc_obj_ct, object_count
> 2 from
> 3 (select ref,
> 4 nvl(lag(ref) over (order by ref, location), ref)
> prev_ref,
> 5 nvl(lag(location) over (order by ref, location), ref)
> prev_loc,
> 6 location,
> 7 object_count,
> 8 nvl(lag(object_count) over (order by ref, location),
> object_count) prev_loc_obj_ct
> 9 from location)
> 10 where nvl(prev_loc_obj_ct, object_count) <> object_count
> 11 and prev_ref = ref
> 12 /

..

> David Fitzjarrell

I love this kind of sql. It seems to me to be oversized in this case, but in general it is great. It makes many things easier and faster.

Do you know what kind of license you need to use these analytic functions?
Is the enterprise license enough or is there more to be licensed? From which Oracle version these functions exist?

Thanks in advance
Andreas

-- 
wenn email, dann AndreasMosmann <bei> web <punkt> de
Received on Thu Aug 18 2011 - 07:46:48 CDT

Original text of this message