run.veric.dev

Refactor safety. Prove that two SQL specs are input-output equivalent — without running them, on any data.

Drop in your before-and-after. Get a verdict in seconds.

Replace SUM(CASE WHEN x > 0 THEN x ELSE 0) with SUM(GREATEST(x, 0)).

original.sql
loading editor…
refactor.sql
loading editor…