How to export orders with a promotion code?

Settings → Import/export
I want to export orders that are using a promotion code, but I can’t find a database entry for the promotion codes?

There’s no such function. You need an SQL query that joins the line items and specifically looks for the promotion types