can you solve this?

From: Hagai Katz <katzh_at_bgumail.bgu.ac.il>
Date: Mon, 21 Aug 2000 12:50:11 +0300
Message-ID: <8nqu1b$pm9$1_at_news.huji.ac.il>


[Quoted] [Quoted] 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 [Quoted] [Quoted] 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 [Quoted] 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 [Quoted] 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 - 11:50:11 CEST

Original text of this message