Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report to give Average # of cases > than 6, 7, 8 days

Status
Not open for further replies.

Ashajohn2021

Programmer
Aug 3, 2022
1
US
I need to create a report that has created date, physician name, case #. I need to display the following in the report.

Average # of days a physician had the followig number of cases assigned:

>6

>7

8

Here is my query.
select a.accession_no, a.created_date, p.last_name, p.first_name, p.mid_name, p.full_name
from accession_2 a
join acc_role_assignment r on a.id = r.acc_id
join personnel_2 p on p.id = r.assigned_to_id and role_id = 2
where created_date >= @StartDate and created_date < = @EndDate

I'm not sure how to do this in my report. I can group on created date, then on physician to get the # of cases per day and per physician, but I'm not sure how to do the above, can someone give me some tips and ideas on how to get started?



thanks a bunch!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top