The view V_PAT_ADT_LOCATION_HX returns one row of information per bed stay. The column ADT_DEPARTMENT_ID is the ID of the bed's department. The column ADT_DEPARTMENT_NAME is that department's name. Two distinct departments can potentially share the same name. Which of the following queries would return exactly one row per department and display the name of the department?   A. SELECT ADT_DEPARTMENT_ID, MIN(ADT_DEPARTMENT_NAME) FROM V_PAT_ADT_LOCATION_HX GROUP BY ADT_DEPARTMENT_ID B. SELECT MIN(ADT_DEPARTMENT_ID), ADT_DEPARTMENT_NAME FROM V_PAT_ADT_LOCATION_HX GROUP BY ADT_DEPARTMENT_ID C. SELECT 'ADT_DEPARTMENT_ID', ADT_DEPARTMENT_NAME FROM V_PAT_ADT_LOCATION_HX GROUP BY ADT_DEPARTMENT_ID D. SELECT ADT_DEPARTMENT_ID, 'ADT_DEPARTMENT_NAME' FROM V_PAT_ADT_LOCATION_HX GROUP BY ADT_DEPARTMENT_ID

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter6: Additional Database Objects
Section: Chapter Questions
Problem 6HOA: A new table has been requested to support tracking automated emails sent to customers. Create the...
icon
Related questions
icon
Concept explainers
Question

The view V_PAT_ADT_LOCATION_HX returns one row of information per bed stay. The column ADT_DEPARTMENT_ID is the ID of the bed's department. The column ADT_DEPARTMENT_NAME is that department's name. Two distinct departments can potentially share the same name.

Which of the following queries would return exactly one row per department and display the name of the department?

 

A. SELECT ADT_DEPARTMENT_ID, MIN(ADT_DEPARTMENT_NAME) FROM V_PAT_ADT_LOCATION_HX

GROUP BY ADT_DEPARTMENT_ID

B. SELECT MIN(ADT_DEPARTMENT_ID), ADT_DEPARTMENT_NAME FROM V_PAT_ADT_LOCATION_HX GROUP BY ADT_DEPARTMENT_ID

C. SELECT 'ADT_DEPARTMENT_ID', ADT_DEPARTMENT_NAME FROM V_PAT_ADT_LOCATION_HX GROUP BY ADT_DEPARTMENT_ID

D. SELECT ADT_DEPARTMENT_ID, 'ADT_DEPARTMENT_NAME' FROM V_PAT_ADT_LOCATION_HX GROUP BY ADT_DEPARTMENT_ID

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage