Work on the sub select of the refactored Sql component