LPS-32110 Refactor SampleSQLBuilder