exam questions

Exam 1z0-071 All Questions

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

Exam 1z0-071 topic 1 question 188 discussion

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

Which statement is true about using functions in WHERE and HAVING?

  • A. Using aggregate functions in the WHERE clause requires a subquery.
  • B. Using aggregate functions in the HAVING clause requires a subquery.
  • C. Using single-row functions in the WHERE clause requires a subquery.
  • D. Using single-row functions in the HAVING clause requires a subquery.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
ArslanAltaf
2 months, 1 week ago
--B WRONG --select avg(salary) from emp group by dept_id having avg(salary) > 1000; --C WRONG --select last_name from emp where upper(last_name) like 'A%'; --D WRONG --Having is Used for Agg Functions. Single-row functions do not require grouping.
upvoted 2 times
...
yaya32
5 months, 3 weeks ago
Selected Answer: A
For me A is correct.
upvoted 1 times
...
c818820
6 months, 1 week ago
B is the Answer.
upvoted 1 times
...
jm9999
9 months, 1 week ago
Selected Answer: A
Example: select employee_id from employees where salary > (select avg(salary) from employees);
upvoted 1 times
...
zouve
1 year ago
A select EmployeeId, sum(amount) from Sales group by Employee where EmployeeId in ( select max(EmployeeId) from Employees)
upvoted 2 times
...
musafir
1 year ago
Selected Answer: B
B is correct But I think C as well is correct
upvoted 1 times
...
MooonLight
1 year, 2 months ago
I thought aggregate functions cannot be used in the WHERE clause?
upvoted 4 times
Rik92
1 year, 2 months ago
You are correct. In that case you would use HAVING
upvoted 2 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