Vitali, while I am not a H2 developer, it appears from your e-mail that your challenge is related to your persistence framework but not to the H2 database itself. You wrote that you can run your query against the JDBC data source and would get the correct result for AVG().
If the persistence frame work returns AVG() == NULL then I would double check first for the actual selected rows before aggregation. Aggregate functions will return NULL when no rows have been selected. Also it might worth replacing H2 with another RDBMS (Derby, Postgres) temporarily just for the sake of narrowing down the issue. Right now I can only advise: 1) send your questions to the persistence framework as long as your query works correctly (or unless you come up with a DDL and a query which fails directly on H2) 2) send (short, simplified, reproducible) code examples instead of screen shots, because nobody will be able to walk through the code using screenshots only Best regards Andreas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/3831e0978e92cd00cc7df32151e58efec25253fc.camel%40manticore-projects.com.
