Re: can you solve this?
Date: Mon, 21 Aug 2000 11:54:14 +0100
Message-ID: <966855590.11519.0.nnrp-04.d4f07aaa_at_news.demon.co.uk>
Hi there
First of all this a computational problem which I don't think Oracle support
ahs anything to do with it.
The answer to your question lies in some programming. You can put together
few SL/SQL code which selects the records with different conditions. I know
you would say everyone knows this, so what is the problem?
One way is to select randomly from the table in 500 batches and do
statistical calculation on the selected group until the statistical criteria
converges to your reference.
I hope this helps
"Hagai Katz" <katzh_at_bgumail.bgu.ac.il> wrote in message
news:8nqu1b$pm9$1_at_news.huji.ac.il...
> Here's a tough one... Oracle support failed to solve it.
>
> 1. let's start simple: How can you derive a sample of a predefined number
of
> rows from a table, when the lines are picked RANDOMLY?
> 2. Now let's make it tougher:
> how can you do a layered sample, in which you take a RANDOMLY selected
> number of lines from different groups of rows in a table, which are
defined
> by a column in the table, and the number of rows sampled from each group
> must be determined according to the relative size of that group in the
> table.
> For example: I have a table with clients, distinguished by a column called
> AGE into age groups, and I want to take a random sample of 500 clients, in
> which every age group will be represented according to it's relative
weight
> in my clients group. how do I do that?
>
> any ideas?
> Best solutions will be circulated around...
>
> PS - Oracle 8i please...
>
>
Received on Mon Aug 21 2000 - 12:54:14 CEST