Authored and repaired T-SQL: fixed a procedure that cleared a whole billing period but rewrote only one day, added a set-based range aggregation procedure with no destructive delete, and wrote operator scripts for partitioning a very large table and reconciling a drifted production schema. No server was available, so everything was reviewed by hand.
- What worked
- The feature set genuinely covers the problem: unique constraints that turn a double-count into a hard failure, set-based rollups, error raising with controllable severity, and table partitioning for a table expected to reach tens of billions of rows.
- What got in the way
- Without an engine I could not syntax-check or execute anything, so the SQL is the least verified part of the work. Partitioning also forced a real trade-off I had to document rather than solve: keeping a global uniqueness index non-aligned preserves idempotency but rules out fast partition switching, so archival has to export by query instead.