Re: Probability Selects

2010-01-11 Thread Johan De Meersman
I think what he's trying to accomplish is not truly random, but to use the probability that's indicated in the second field of the table: 1, Aaron, 0.240 > 3, Abe, 0.006 > 13, Adrian, 0.069 > So there would be a probability of 0.240 that the call returns Aaron, a probability of 0.006 that it retu

Re: Probability Selects

2010-01-11 Thread Baron Schwartz
Matt, On Thu, Jan 7, 2010 at 3:10 PM, Matt Neimeyer wrote: > What's the best way to select names at random from this but still take > into account frequency of use? Here's the link I usually send clients: http://jan.kneschke.de/projects/mysql/order-by-rand/ -- Baron Schwartz Percona Inc: Servi

Re: Probability Selects

2010-01-07 Thread Tom Worster
On 1/7/10 3:10 PM, "Matt Neimeyer" wrote: > 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, > `Na

RE: Probability Selects

2010-01-07 Thread Daevid Vincent
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

Probability Selects

2010-01-07 Thread Matt Neimeyer
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