Question: I'm learning SQL and I'm confused by this question. My thinking is that it is A, but part of my brain says it should be

I'm learning SQL and I'm confused by this question.

My thinking is that it is A, but part of my brain says it should be B.

Any help is appreciated.

I'm learning SQL and I'm confused by this question. My thinking is

GROUPING #5-1 The following SQL query returns one row per surgeon. The granularity before GROUP BY is a surgeon- panel combination, in other words, for each surgeon, one panel they performed in Surgeons can only be listed once per panel, but a log can have more than one panel. SELECT stoff.STAFF_NM_WID 'Surgeon", COUNT( Orl.LOG_ID) "Number of Logs" FROM OR LOG ort INNER JOIN Y_LOG_STAFF staff ON orl.LOG_ID = staff.LOG_ID INNER JOIN OR_LOG_ALL PROC procs ON od. LOG_10 - procs.LOG_ID AND procs LINE - 1 --Fust listed procedure WHERE stoff. STAFF_TYPE_MAP_NM = 'Physician GROUP BY stoff.STAFF_NM_WID Panels ore identified by the column procs.ALL PROCS_PANEL. Logs are identified by the column or.LOG_ID Part 1 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 (2 PTS) A. Add procs ALL_PROCS_PANEL to the GROUP BY cause B. Add orl.LOG_10 to the GROUP BY clause C. Remove staff. STAFF_NM_WID from the GROUP BY clouse D. Change nothing in the GROUP BY clause

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!