Question
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
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)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started