Testing for SELECT query