Home Forums Event Espresso Premium Registrations CSV Export – SQL query

Registrations CSV Export – SQL query

Posted: September 14, 2018 at 10:30 am


September 14, 2018 at 10:30 am


The filtered “Approved” registrations CSV export with all data columns is very helpful, however I would like to run a few reports on the database, trimming out un-needed columns and making custom reports for my team.

I was wondering if you have a SQL query handy that will give me the same data as what gets exported in the CSV export.



  • Support Staff

September 14, 2018 at 10:49 am


I do not have an SQL query handy that would replicate CSV report. There are a lot of relationships between tables with that particular report, and Event Espresso 4 uses a model system which basically handles all the tricky SQL joins. So even if you look in the source, you will not see SQL queries there.

What you could do is install one of the plugins like WP_DEBUG bar and then add:
define( 'SAVEQUERIES', true );
to your site’s wp-config.php file. Then when you run a report via the Registrations page, you can click on the Debug bar and view all the queries that just happened.

Or, if you’re really just looking to trim the columns, you can make use of the FHEE__EE_Export__report_registrations__reg_csv_array filter hook and have the unwanted columns trimmed away when you run the report from the UI.

Here are some links to some code examples that can be followed & added to a plugin on your site:
To specify the columns you want:
To specify the columns you do not want:


September 14, 2018 at 10:58 am

Excellent! That is super helpful. Thanks as always, Josh.

The support post ‘Registrations CSV Export – SQL query’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  FINS SWIMMING 1 year, 8 months ago ago

Topic Tags

Tagged: ,


This topic is:
Do NOT follow this link or you will be banned from the site!