The following query will give you the users name, id, email address and organization.
SELECT people_emails.person.id, people_emails.date_created, people_emails.person, people_emails.email, people_emails.person.organization.name
FROM people_emails
WHERE people_emails.date_created = %THIS_MONTH% copy
You can change the time period under WHERE depending on what users you want to export e.g users that were created THIS_YEAR, LAST_MONTH etc.
This report will give you more information - all of the above plus their address and phone number.
SELECT people_emails.person.id, people_emails.person, people_emails.email, people_emails.person.organization.name AS 'Organization Name', people_emails.person.contact_data.field_1 AS 'Address', people_emails.person.contact_data.field_2 AS 'City', people_emails.person.contact_data.field_3 AS 'State', people_emails.person.contact_data.field_4 AS 'Zipcode', people_emails.person.contact_data.field_5 AS 'Country', people_emails.person.phone_numbers.number AS 'Phone Number'
FROM people_emails
WHERE people_emails.date_created = %THIS_MONTH%
ORDER BY people_emails.person.id copy
Please log in or register to submit a comment.