test the select statement