List:General Discussion« Previous MessageNext Message »
From:Matt Neimeyer Date:January 7 2010 8:10pm
Subject:Probability Selects
View as plain text  
I've tried Googling till my brain is fried and I'm obviously missing
something because I'm not finding anything useful.

I'm trying to select names at random from a table that contains the
name and the frequency at which it is actually used in society. The
table is defined as follows:

CREATE TABLE `MaleNames` (
 `Name_ID` int(11) NOT NULL auto_increment,
 `Name` char(50) default NULL,
 `Frequency` decimal(5,3) default NULL,
 PRIMARY KEY  (`Name_ID`)
)

Some examples:

1, Aaron, 0.240
3, Abe, 0.006
13, Adrian, 0.069

What's the best way to select names at random from this but still take
into account frequency of use?

Thanks in advance!

Matt
Thread
Probability SelectsMatt Neimeyer7 Jan
  • RE: Probability SelectsDaevid Vincent7 Jan
  • Re: Probability SelectsTom Worster8 Jan
  • Re: Probability SelectsBaron Schwartz11 Jan
    • Re: Probability SelectsJohan De Meersman11 Jan