Re: [sqlite] Getting random data from grouped data in one table

2011-03-09 Thread Max Vlasov
On Wed, Mar 9, 2011 at 11:53 AM, eric wong wrote: > But now, I must get the data from certain PATIENT_GROUP. > > What's your best approach to solve this? The objective is the fastest > possible query. > > Thanks. > > There's an approach with "order by random" mentioned by

[sqlite] Getting random data from grouped data in one table

2011-03-09 Thread eric wong
Here is the situation. I have one database table "TB_Patient" with the columns below: PATIENT_ID PATIENT_GROUP FIRSTNAME LASTNAME ADDRESS I want to get PATIENT_ID randomly from certain PATIENT_GROUP. There are 5 PATIENT_GROUP only with total row in the table is about 1 (10K). The number of