1 Chronicles 19:18

19:18 The Arameans fled before Israel. David killed 7,000 Aramean charioteers and 40,000 infantrymen; he also killed Shophach the commanding general.

1 Chronicles 20:1

20:1 In the spring, at the time when kings normally conduct wars, Joab led the army into battle and devastated the land of the Ammonites. He went and besieged Rabbah, while David stayed in Jerusalem. Joab defeated Rabbah and tore it down.