I want rows with a higher value to show up more often then rows with a lower value in a column. The constraint is I do not want to have multiple rows representing the same record. It's easy to solve with say 100 rows verses 30 rows using just RAND: but doing it the way I have below might achieve the same result with 1 row.
-->-----Original Message----- -->From: Becoming Digital [mailto:[EMAIL PROTECTED] -->Sent: Tuesday, June 10, 2003 11:33 AM -->To: [EMAIL PROTECTED] -->Subject: Re: Hmm looks like this query works --> -->What's your end goal, and for what do you need/desire a "weighted -->random?" Your -->objective will determine if this is actually of use or if it simply -->appears to -->be. --> -->Edward Dudlik -->Becoming Digital -->www.becomingdigital.com --> --> -->----- Original Message ----- -->From: "Dathan Vance Pattishall" <[EMAIL PROTECTED]> -->To: <[EMAIL PROTECTED]> -->Sent: Tuesday, 10 June, 2003 14:19 -->Subject: Hmm looks like this query works --> --> -->I have a question. If I wanted to sort randomly on a column weighted by -->the value of the column will does this query work --> -->SELECT val_column, val_column*0.1+RAND() as rand_col from TABLE ORDER BY -->rand_col limit 10; --> -->This should five me a random row weighted by the value of the column is -->this correct? Seems to be but I might be wrong. --> -->Thanks for any tips --> -->-- -->Dathan --> --> --> -->-- -->MySQL General Mailing List -->For list archives: http://lists.mysql.com/mysql -->To unsubscribe: -->http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]