Xref: alice comp.databases.oracle.misc:23727
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!newsfeed.cwix.com!207.0.56.122!news.eli.net!not-for-mail
Message-ID: <367342F1.17E3699B@2xtreme.net>
From: PMG <pete_g@2xtreme.net>
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.misc
Subject: Re: Calling all SQL Gurus ...
References: <367211A5.18EBEA34@2xtreme.net> <3673018D.965C1F04@Feist.Com> <3673131f.0@paperboy.telerama.com> <36731283.B3C0F9F5@Feist.Com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 44
Date: Sun, 13 Dec 1998 04:30:33 GMT
X-Complaints-To: abuse@2xtreme.net
X-Trace: news.eli.net 913523433 209.63.215.85 (Sat, 12 Dec 1998 21:30:33 MDT)
NNTP-Posting-Date: Sat, 12 Dec 1998 21:30:33 MDT
Organization: 2xtreme.net NewsReader Service

First of all, thanks for your reply. There is a real world need for the type
of query I am looking for - I think it's called a Pareto query. In our case,
we have a database that tracks production problems. Each type of problem has
a problem_code. So, management is interested in seeing which problem_codes
are most frequent, and they, being management, are not interested in the
minutiae, but only in the ones that account for 80% of all production
problems. According to the Pareto 80/20 principle, approx 20% of the
problem_codes will account for approximately 80% of the problems.

Presently, I am implementing this the old-fashioned way -- i.e. non-SQL
procedural -- by inserting group data into a table, then going back to the
first row, and calculating the percentage of the total for the first group,
then the next, etc. Finally I sort.
It works, but I was hoping that there is a nice little query (that an
ordinary guy like me can understand) that will do the same thing.

Regarding your query, it will take me a month of Sundays to try to figure
out what is happening! Re your intimation for $100, is this a rule-based
hint or a cost-based hint?


"KeyStroke (Jack L. Swayze Sr.)" wrote:

> There was once a movie about Evlis that showed someone asking him to
> sing (this was before he got famous) in a diner (or something like
> that).  After Evlis sung the song, Elvis then asked the person who asked
> him to sing what that person did for a living.  The guy who asked Elvis
> to sing said he did apolstery.  Elvis then said that the guy could re-do
> his seats in his car.  When the guy asked why he should re-do the seats
> in Elvis' car Elvis replied that since that is what he does for a
> living, and as Evlis sings for a living, then the guy can pay Elvis for
> singing by re-doing the seats in Elvis' car.
>
> Daniel Clamage wrote:
>
> > >>You can mail the $100 check to my residence.
> > I hope you're kidding.
> >
> > --
> > - Dan Clamage
> > http://www.telerama.com/~dclamage
> > If you haven't crashed the Server,
> > you haven't been trying hard enough.

