Path: news.cambrium.nl!textnews.cambrium.nl!feeder3.cambrium.nl!feeder8.cambrium.nl!feed.tweaknews.nl!193.201.147.80.MISMATCH!news.astraweb.com!border3.a.newsrouter.astraweb.com!hq-usenetpeers.eweka.nl!81.171.88.15.MISMATCH!eweka.nl!lightspeed.eweka.nl!feeder.erje.net!newspeer1.de.telia.net!newspeer4.de.telia.net!de.telia.net!nx02.iad.newshosting.com!newshosting.com!post02.iad!not-for-mail
Date: Fri, 12 Dec 2008 11:55:51 -0800
From: DA Morgan <damorgan@psoug.org>
Organization: Puget Sound Oracle Users Group
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.misc
Subject: Re: complex SQL ?
References: <f99fe64f-8f98-4519-b5ce-9f9ca2d0b259@q37g2000vbn.googlegroups.com> <4d561ffb-2b2c-4211-850c-a2a9d3aa3f52@r36g2000prf.googlegroups.com>
In-Reply-To: <4d561ffb-2b2c-4211-850c-a2a9d3aa3f52@r36g2000prf.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <1229111755.651958@bubbleator.drizzle.com>
Cache-Post-Path: bubbleator.drizzle.com!unknown@dsl-216-162-218-178.drizzle.com
X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/)
Lines: 25
X-Complaints-To: abuse@csolutions.net
Xref:  news.cambrium.nl

Jazz wrote:
> I figured it out, sorry, it is not very complex at all,
> 
> SELECT * FROM table t where t.est < t.real;
> 
> or also using HAVING clause somehow...

Glad you solved it ... but a couple of pointers.

1. HAVING clause is filtering on groups created by GROUP BY
2. ID is a reserved word
3. REAL is a reserved word

SELECT COUNT(*)
FROM v$reserved_words
WHERE keyword = '<your_word_here>';

Is a valuable query to learn.
-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
