nerdexam
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)
  • A
    6% (1)
  • B
    72% (13)
  • C
    17% (3)
  • D
    6% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice