Simple query for derby database.