Without having some sample data from the tables involved,its very difficult to provide an accurate solution. So can you provide the table structures and sample data please? it will something like:-SELECT COUNT(PAT_NBR) AS PatientCountFROM OI_CHARGES, PHYSICIAN,PC_DESC,DIAGNOSIS_CDWHERE OI_CHARGES.PERF_PHYS_NBR=PHYSICIAN.PHYS_NBRAND OI_CHARGES.DIAG_CD=DIAGNOSIS_CD.DIAGNOSIS_CDAND OI_CHARGES.PROC_CD=PC_DESC.PC_PROC_CDANDAGC_CD = 'OBGYN' AND DT_OF_SERVICE BETWEEN '20070701' AND '20080630';
provided the tables are all 1:1 related this will give you full patient count.SELECT COUNT(PAT_NBR) AS PatientCount,PERF_PHYS_NBRFROM OI_CHARGES, PHYSICIAN,PC_DESC,DIAGNOSIS_CDWHERE OI_CHARGES.PERF_PHYS_NBR=PHYSICIAN.PHYS_NBRAND OI_CHARGES.DIAG_CD=DIAGNOSIS_CD.DIAGNOSIS_CDAND OI_CHARGES.PROC_CD=PC_DESC.PC_PROC_CDANDAGC_CD = 'OBGYN' AND DT_OF_SERVICE BETWEEN '20070701' AND '20080630'GROUP BY PERF_PHYS_NBR
and this count of patients per physician. But i cant guarantee this gives you what you want unless i'm sure of how tables are related and how data will be for which you've provide what's asked above.