This seems like it should be easy, but I can't figure it out. I have a database that includes a table with all patients admitted to our ICU including the date and time of admission and discharge from the ICU. We need to generate a daily census between two dates (can be entered by the person running the query) to count the number of patients in the ICU on each date at a specific time (08:00 AM).
For example if we need the data from Jan 1, 2007 to Jan 31, 2007 I would like to end up with a table that has a row for each date in that range and the number of patients in the ICU at 08:00 AM on that date.
Thank you very much,