I
Ian
I need help with the logic of this problem: I am trying to determine how
long people wait for an appointment. The db records the each appt with a
unique apptID, appttype, apptdate (amoung other variables). I need to
organize my results so that the query will show:
a) Each date an appointment occured.
b) A count of the number of appointment that occured in the 30 days prior to
the specificed date (CountPre)
c) A count of the number of appointments that were in the system on or after
the specified date (CountPost)
What I want to end up with is a list like this:
Date CountPre CountPost
January 1 30 60
January 2 25 53
January 3 27 72
For the life of me I can't wrap my head around how to structure the query.
Any help is always appreciated. thx. Ian
long people wait for an appointment. The db records the each appt with a
unique apptID, appttype, apptdate (amoung other variables). I need to
organize my results so that the query will show:
a) Each date an appointment occured.
b) A count of the number of appointment that occured in the 30 days prior to
the specificed date (CountPre)
c) A count of the number of appointments that were in the system on or after
the specified date (CountPost)
What I want to end up with is a list like this:
Date CountPre CountPost
January 1 30 60
January 2 25 53
January 3 27 72
For the life of me I can't wrap my head around how to structure the query.
Any help is always appreciated. thx. Ian