Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

GROUPING #5-2 The following SQL query retums one row per surgeon. The granularity before GROUP BY is a surgeon panel combination, in other words, for

image text in transcribed

GROUPING #5-2 The following SQL query retums one row per surgeon. The granularity before GROUP BY is a surgeon panel combination, in other words, for coch surgeon, one panel they performed in. Surgeons aan only be listed once per panel, but a log con hove more than one panel. SELECT staff. STAFF_NM_WID"Surgeon", COUNT( OP.LOG_10 ) Number of Logs" FROM OR_LOG or1 INNER JOIN V_LOG_STAFF staff ON or.LOG_ID = staff.LOG_ID INNER JOIN OR_LOG_ALL_PROC procs ON orl.LOG_ID - procs.LOG_10 AND procs. LINE = 1 --First listed procedure WHERE staff.STAFF_TYPE_MAP_NM - 'Physician GROUP BY stoff. STAFF NM WID Ponels are identified by the column procs ALL PROCS_PANEL. Logs are identified by the column orl.LOG_10. Part 2 of 2 Which of the following steps are necessary to count the number of logs a surgeon performed in, while avoiding counting logs twice when a surgeon performed in more than one panel? SELECT ONE OF THE FOLLOWING (1 PT) A. Change - SELECT to "SELECT DISTINCT" B. Change COUNT( ortLOG_ID ) to "DISTINCT COUNT( od.LOG_ID)" C. Change COUNT( Orl.LOG_ID ) to COUNT( DISTINCT OR.LOG_ID)" D. None of the above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

4. What sales experience have you had?

Answered: 1 week ago

Question

Differentiate the function. r(z) = 2-8 - 21/2 r'(z) =

Answered: 1 week ago