Question
TO AID IN FINDING A PATIENT'S LATEST LAB RESULT, YOU BUILD THE FOLLOWING COMMON TABLE EXPRESSION: MAXRESULTDATE AS ( SELECT PAT_ID, PROC_ID FROM RESULTS GROUP
TO AID IN FINDING A PATIENT'S LATEST LAB RESULT, YOU BUILD THE FOLLOWING COMMON TABLE EXPRESSION:
MAXRESULTDATE AS ( SELECT PAT_ID, PROC_ID FROM RESULTS GROUP BY PAT_ID, PROC_ID)
THE COLUMN MAXRESULTDATE.PAT_ID REPRESENTS ONE PATIENT. THE COLUMN MAXRESULTDATE.PROC_ID REPRESENTS A PROCEDURE. 'RESULTS' IS ANOTHER COMMON TABLE EXPRESSION THAT CONTAINS POTENTIALLY MANY ROWS OF RESULTS FOR EACH PATIENT-PROCEDURE COMBINATION. THE COLUMN RESULTS.RESULT_DATE STORES THE DATE OF EACH RESULT.
WHICH OF THE FOLLOWING WILL RETIRN THE DATE OF JUST THE LATEST LAB?
A. ADD ",RESULT_DATE" TO THE GROUP BY CLAUSE AND THE SELECT CLAUSE.
B. ADD ",RESULT_DATE" TO THE GROUP BY CLAUSE AND AN ORDER BY CLAUSE.
C. ADD ",MAX(RESULT_DATE)" TO THE SELECT CLAUSE.
D. ADD ",MIN(RESULT_DATE)" TO THE SELECT CLAUSE.
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