Massive losses and large tax deductions in Donald Trump’s returns reveal how the former U.S. president was able to use the tax code to minimize his income tax payments.

Democrats on the House Ways and Means Committee released Trump’s tax returns Friday, after he lost a multiyear legal battle to keep them private. The documents show the president’s complex, and sometimes unusual, financial situation.

The records illustrate how Trump, as a business owner and a real estate developer, is eligible for a bevy of tax breaks that most taxpayers can’t claim. The filings, which cover 2015 to 2020, also detail how Trump was affected by the 2017 tax-cut bill he signed into law.