Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Random sample by subgroup

Random sample by subgroup

From: <PMDORAIS_at_gmail.com>
Date: 30 Oct 2006 11:02:56 -0800
Message-ID: <1162234976.272547.259500@h48g2000cwc.googlegroups.com>


Hi,

First, i'm a newbie with sql and i would like to do the following:

I want to extract a random sample for each value of a certain field in a table;

For example

table

clientid    name      group
1             xxx           a
2             yyy           b
3             ccc           c

etc...

and i would like a sample of 20% of the records for each group (a, b, c).... how can i do that...??

thanks! Received on Mon Oct 30 2006 - 13:02:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US