Open-source category org.hibernate.dialect.MySQLDialect
In the constructor to include two lines of code
registerFunction ( "variance", new StandardSQLFunction ( "variance", Hibernate.DOUBLE));
registerFunction ( "stddev", new StandardSQLFunction ( "stddev", Hibernate.DOUBLE));
Compile this class, the replacement of the same name to hibernate3.jar in class.
Village at HQL you can use the following statement you:
select stddev (obj.nl) from User as obj
This SQL can be directly obtained form the user's age standard deviation (seeking variance with variance function).