Added correct Derby test query