exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 125 discussion

Actual exam question from Oracle's 1z0-071
Question #: 125
Topic #: 1
[All 1z0-071 Questions]

Examine the description of the EMPLOYEES table:



Which two queries will execute successfully? (Choose two.)

  • A. SELECT dept_id, AVG(MAX(salary)) FROM employees GROUP BY dept_id HAVING hire_date > '01-JAN-19';
  • B. SELECT dept_id, SUM(salary) FROM employees WHERE hire_date > '01-JAN-19' GROUP BY dept_id;
  • C. SELECT dept_id, MAX(SUM(salary)) FROM employees GROUP BY dept_id;
  • D. SELECT dept_id, AVG(MAX(salary)) FROM employees GROUP BY dept_id, salary;
  • E. SELECT AVG(MAX(salary)) FROM employees GROUP BY salary;
Show Suggested Answer Hide Answer
Suggested Answer: BE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
lucemqy
1 month, 3 weeks ago
Selected Answer: BE
BE is the correct answer
upvoted 1 times
...
Shrimathi
5 months, 2 weeks ago
BE tested
upvoted 1 times
...
WingL
6 months ago
Selected Answer: BE
Tested. A. not a GROUP BY expression C.D boths are not a single-group group function
upvoted 1 times
...
zouve
6 months, 2 weeks ago
Selected Answer: BE
BE tested
upvoted 1 times
...
CyberP
7 months, 2 weeks ago
I think answer B is the only correct answer because In SQL, a group function operates on a set of rows and returns a single value for each group. Group functions include AVG, COUNT, MAX, MIN, and SUM. These functions cannot be nested within one another. For example, in query A, the AVG function is nested within the MAX function which is not allowed. Similarly, in query C, D and E, the MAX function is nested within the AVG function which is also not allowed. What do you think?
upvoted 4 times
...
MooonLight
8 months, 3 weeks ago
C works.
upvoted 1 times
zouve
6 months, 2 weeks ago
ORA-00937: not a single-group group function
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago