Collapse select

This commit refactors the SELECT query generation to not use position arguments for anything other than the fields and from clause.