Database query test.