H2 query implementing