One of the biggest deals in New York City’s recent history went down in flames on Thursday when Amazon announced it was no longer going to open a major office in Queens. The news highlighted a debate over what kind of welcome, if any, we should roll out when a rich company comes to town promising new jobs.

Here’s everything you need to know about the deal that died:

The deal: The state and city offered nearly $3 billion in public subsidies in exchange for the company bringing at least 25,000 jobs and other investments. Amazon agreed to make some local hires and to fund some tech education. It did not agree to change its longstanding opposition to unionizing its work force.

[Read about Amazon canceling the plan.]

The money: Supporters of the plan said New York would eventually reap more than $27 billion in tax revenue. Critics questioned that number and said the money spent on subsidies should have been spent on improving housing and mass transit.

The upset: Representative Alexandria Ocasio-Cortez came to power by unseating a high-ranking incumbent in a congressional district that includes parts of Queens near Long Island City. So when she opposed this deal, lawmakers took notice. Her supporters helped organize protests of Amazon’s project and helped block one of the biggest companies in the country.

The blame: Gov. Andrew M. Cuomo and Mayor Bill de Blasio, both Democrats, are longtime rivals. But they joined forces to support this deal. When Amazon pulled out, they went back to feuding. Mr. de Blasio blamed the company for leaving. Mr. Cuomo blamed Senate Democrats, whose leadership questioned the deal.