A counterfactual-database reward for reinforcement learning text-to-SQL agents reduces full payment to buggy queries and ...