Oracle
1Z0-860 · Question #166
Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?
The correct answer is B. SELECT NEW Integer(MAX(r. chairs)) FROM Room r. See the full explanation below for the reasoning.
Question
Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?
Options
- ASELECT ANY(r. chairs) FROM Room r
- BSELECT NEW Integer(MAX(r. chairs)) FROM Room r
- CSELECT r FROM Room r WHERE r.chairs > AVG(r.chairs)
- DSELECT c FROM Chair c WHERE LOCATE (c.type, lazyboy) > -1
How the community answered
(18 responses)- A6% (1)
- B72% (13)
- C17% (3)
- D6% (1)
Community Discussion
No community discussion yet for this question.