"Simplify" some code in SQL Building

/hail reflection