I’m trying to run a data explorer query to allow me to collect email addresses of the users signing up for our community. The primary goal here is to try to find out if they are a customer or partner of our company, assuming that they didn’t use a personal email address, then I can add them to the appropriate group.
The problem I’m having is that with a where clause in my query I get NULL returned on the email address in most cases. Here is the query I’m running:
SELECT u.username AS "username", u.email FROM users u WHERE u.created_at > '2017-09-11'
If I run this I get the NULL for email but otherwise it works. I read through the original data explorer thread and saw an example using user ID, which works if I set it to 0 in my where clause like this:
SELECT u.username AS "username", u.email FROM users u WHERE u.id > 0
This works as expected. But if I change it to be above a certain value, in my case the last user to sign up before we opened the community up was 384, I get the same NULL values for email:
SELECT u.username AS "username", u.email FROM users u WHERE u.id > 384
It feels like this is a bug as I wouldn’t expect the where clause to cause email addresses not to be shown, but it also seems to work inconsistently. I’m on a Discourse hosted account if that helps troubleshoot things.