Hello

BS> select
BS> patient_id
BS> from
BS> table1
BS> where
BS> age = 50
BS> limit 6
BS> union all
BS> select
BS> patient_id
BS> from
BS> table1
BS> where
BS> age = 60
BS> limit 4

You might want to wrap the two selects with limits inside subqueries:

select patientID 
from (
  select patientID 
  from table1 
  where age = 50 
  limit 6
) 
union all 
select patientID 
from (
  select patientID 
  from table1 
  where age = 60 
  limit 4
);

Swithun.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to