CAY-1968 SQLSelect cleanup and omissions

* also a unit test for SQLSelect