The Table OR_LOG_TIMING_events had one row for each timing event
documented in a log. You are writing a query that must have one row
for each log, with each timing event in a separate column.
The column TIMING_EVENT_C identifies which timing event is being documented, & the column Timing_event_DTTM is the time at which the timing event occurred. The column LOG_ID identifies the log on which the timing
event was being documented.
Timing_Event_c = 1-- represents the event for IN Facility. Which of the following will return the time a patients was in Facility in a separate column?
A. CASE WHEN TIMING_EVENT_C = 100 THEN MAX(TIMING_EVENT_DTTM)ELSE NULL END
B. MAX(CASE WHEN TIMING_EVENT_C=100 THEN TIMING_EVENT_DTTM ELSE NULL END)
C. CASE WHEN TIMING_EVENT_C = 100 THEN NULL ELSE MAX(TIMING_EVENT_DTTM) END
D. MAX(CASE WHEN TIMING_EVENT_C=100 THEN NULL ELSE TIMING_EVENT_DTTM END)