It's not a problem with query_factory, because it's just executing the query given to it.
The email_export.php line 88 gives it a query, which it has just extracted from the database via lines 86-87, based on lines 72-73 which read whatever you chose from your dropdown menu.

Maybe the problem is that your server is being ultra sensitive about the kinds of data it allows to be submitted, and so could be treating the ">" symbol in "Dormant Customers (>3months) (Subscribers)" as a scary character (because > is the end of an HTML tag, and used in SQL queries).

To test that:
- go into phpMyAdmin
- to the query_builder table
- to (what is normally) record #3
- and look at the query_name field: Right now it should say: "
Dormant Customers (>3months) (Subscribers)"
- Change the
>3 in there to >3 so that it displays a greater-than symbol via html encoded characters instead of the actual symbol.
Save the change, and try the exporter again, after reloading the page.