http://www.greggdev.com/web/articles.php?id=6
> -----Original Message----- > From: Matt Neimeyer [mailto:m...@neimeyer.org] > Sent: Thursday, January 07, 2010 12:10 PM > To: mysql@lists.mysql.com > Subject: Probability Selects > > 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 > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?unsub=dae...@daevid.com > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org