actually SELECT COUNT(DISTINCT ...
On 5/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
It will be as the below query, but replace: distinct p.* with: count(p.ID) RBS >> Allan, Mark wrote: >> > What I want is Joe Blogs just the once. >> > >> > >> Mark, >> >> Then try adding distinct like this: >> >> select distinct p.* >> from PatientsTable as p >> join ExaminationsTable as e on e.PatientID=p.ID >> join TestTable as t on t.ExamID=e.ID >> join ForcedSpiroTable as f on f.TestID=t.ID >> join RelaxedSpiroTable as r on r.TestID=t.ID >> where f.EVC > 2.0 and r.FVC > 2.0; > > Ok, so here's another question, how would I get the count of patients > where the EVC and FVC > 2.0? > >
-- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation http://www.osgeo.org/education/ --------------------------------------------------------------------- collaborate, communicate, compete ===================================================================== ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------