AntiPattern
SQL Query Shape Drift
sql-shape-drift
Aggregations and set operations get reshaped by SQL clauses (ROLLUP, UNION, IN/EXISTS, window functions, LIMIT-in-subqueries), causing either missing subtotal/duplicate logic or unexpectedly heavy execution plans. The stakes are wrong results and slow or brittle migrations.