From: Daevid Vincent Date: January 7 2010 9:25pm Subject: RE: Probability Selects List-Archive: http://lists.mysql.com/mysql/220133 Message-Id: <7762ED26D757437FBBDC7ADFA3C71755@mascorp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit http://www.greggdev.com/web/articles.php?id=6 > -----Original Message----- > From: Matt Neimeyer [mailto:matt@stripped] > Sent: Thursday, January 07, 2010 12:10 PM > To: mysql@stripped > 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=daevid@stripped >