Add a JPQL named query to the FirstcupUser entity that returns the mean average age difference of all firstcup users.
This query uses the AVG aggregate function to return the mean average of all the values of the ageDifference property of the FirstcupUser entities.
Directly before the class definition, paste in the following code:
@NamedQuery(name="findAverageAgeDifferenceOfAllFirstcupUsers", query="SELECT AVG(u.ageDifference) FROM FirstcupUser u)
The @NamedQuery annotation appears just before the class definition of the entity, and has two required attributes: name, with the unique name for this query; and query, the JPQL query definition.