Refactoring: create a separate class for Insert with selects