First implementation of sql query output
Added some basic tests. Fixed minor errors with sql query production
Fixed sql query construction bug that caused panics when using clauses
Added tests to round out sql construction