Joab defeats the Ammonites at Rabbah
Joab defeated the Ammonites and David set them to forced labor.
Key passages
2 Sa 11:1

It came about in the spring, at the time kings go out, David sent Joab and his servants with him and all of Israel. They ravaged all of the Ammonites and besieged Rabbah, but David was remaining in Jerusalem.

2 Sa 12:26–31

And Joab fought against Rabbah of the Ammonites, and he captured the royal city. Then Joab sent messengers to David and said, “We have fought against Rabbah, and we captured the city of the waters. So then, gather the remainder of the army and encamp against …

1 Ch 20:1–3

And it happened that in the spring time of year, the time when kings go out to battle, Joab led the troops of the army and destroyed the land of the Ammonites. And he came and besieged Rabbah, but David remained in Jerusalem. And Joab struck Rabbah and destroyed it. …