Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Calling all SQL Gurus ...
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.
Received on Sat Dec 12 1998 - 22:30:33 CST