Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?

Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is
of type int?

Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is
of type int?

A.
SELECT ANY(r. chairs) FROM Room r

B.
SELECT NEW Integer(MAX(r. chairs)) FROM Room r

C.
SELECT r FROM Room r WHERE r.chairs > AVG(r.chairs)

D.
SELECT c FROM Chair c WHERE LOCATE (c.type, lazyboy) > -1



Leave a Reply 0

Your email address will not be published. Required fields are marked *