Some rows of the STUGRADE table of a school are shown below:   STU_CODE CLS_CODE GRADE YEAR 291 111 3.1 2010 938 101B 2.3 2011 931 M101 3.3 2040 291 M101 3.4 2018 190 111 2.0 2021 931 321 3.9 2003   You want to show all STU_CODE with average grades higher than 3.0. Which of the following gets the required data?     a. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 GROUP BY STU_CODE   b. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE GRADE > 3.0 GROUP BY STU_CODE   c. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE GROUP BY STU_CODE HAVING AVG(GRADE) > 3.0   d. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 AND STU_CODE GROUP BY STU_CODE

icon
Related questions
Question
Some rows of the STUGRADE table of a school are shown below:

 

STU_CODE

CLS_CODE

GRADE

YEAR

291

111

3.1

2010

938

101B

2.3

2011

931

M101

3.3

2040

291

M101

3.4

2018

190

111

2.0

2021

931

321

3.9

2003

 

You want to show all STU_CODE with average grades higher than 3.0. Which of the following gets the required data?

 

  a.

SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 GROUP BY STU_CODE

  b.

SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE GRADE > 3.0 GROUP BY STU_CODE

  c.

SELECT STU_CODE, AVG(GRADE) FROM STUGRADE GROUP BY STU_CODE HAVING AVG(GRADE) > 3.0

  d.

SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 AND STU_CODE GROUP BY STU_CODE

 

AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution