test selectQuery