Question: #21 Use the following query to answer the question below it: SELECT [Valid Patients).PAT_NAME, [Valid Patients).(Age Class]. PATIENT.HOME_PHONE FROM PATIENT INNER JOIN (SELECTV_PAT_FACT.PAT_ID Patient ID,

 #21 Use the following query to answer the question below it:

#21 Use the following query to answer the question below it: SELECT [Valid Patients).PAT_NAME, [Valid Patients).(Age Class]. PATIENT.HOME_PHONE FROM PATIENT INNER JOIN (SELECTV_PAT_FACT.PAT_ID "Patient ID", V_PAT_FACT.PAT_NAME "Patient Name", CASE WHEN V_PAT_FACT.AGE_YEARS >= 18 THEN 'Adult ELSE 'Ped' END "Age Class" FROM V_PAT_FACT WHERE V_PAT_FACT.IS_VALID_PAT_YN - YO) "Valid Patients" ON PATIENT.PAT_ID = [Valid Patients)."Patient ID Why does this query fail to run? SELECT ONE OF THE FOLLOWING (2 PTS) A. "Age Class" is invalid because subqueries cannot use CASE statements to define their columns B. "Valid Patients" is an invalid alias in the parent query's FROM clause C. The subquery does not make a PAT_NAME column available to the parent query D. The parent query does not reference each of the subquery's columns

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!