Site icon SOS Resources

Intake Count for Period

β€œIs there a way that I might be able to run a report that will tell me the exact number of intakes in a given
period of time?”
SELECT
   Patients.LicNum, 
   Providers.ProvCode, 
   Count(*) as "Count"
FROM
   sos.Patients
   LEFT OUTER JOIN sos.Providers ON Patients.ProviderNum = Providers.ProviderNum
WHERE
   Patients.IntakeDate BETWEEN '2003-01-01' AND '2003-12-31'
GROUP BY
   Patients.LicNum, 
   Providers.ProvCode
ORDER BY
   Patients.LicNum, 
   Providers.ProvCode
The "Licnum" represents the data set number. If you have only one data set, you can leave that out.
Exit mobile version