“Any suggestions on how to create a query that would provide a count of the Dates Of Service for each patient within a specified date range? I would also need either rendering provider or primary.
SELECT id, provcode, count(distinct trandate) as SrvDateCount FROM sos.rv_charges WHERE trandate between '2001-01-01' and '2001-03-31' GROUP BY id, provcode
Obviously set the date range correctly. Note that the DISTINCT in this case must be within the parens with the column you want the distinct count of.