Tagging Sign Up Emails as Work vs Personal
Say you’re building a B2B product. A lead who signs up with a corporate email is more likely a qualified buyer.
Of course, email type is not the only signal (see our template on Lead Scoring). Once you've baked all your signals into a Lead Score, you can even pull a daily report of Recent Qualified Leads.
Why SQL?
SQL is fast and flexible. You can write a CASE
statement in a snap, no data instrumentation or JIRA tickets required.
SQL you can copy / paste
Use this query on any users
table ( ⚠️ if your table is massive, filter by created_at
).
select
id,
first_name,
last_name,
email,
case
when email similar to '%(gmail|yahoo|outlook|hotmail)%' then 'personal' --simplified list
else 'business'
end as email_type
from users;
Sample Output:
| id | first_name | last_name | email | email_type |
|--------|------------|-----------|----------------------|------------|
| 538107 | Aaliyah | Funk | aaliyah@craftery.com | business |
| 471400 | Abbey | Miller | abbey@weavel.com | business |
| 565108 | Cheyenne | Reilly | cheyenne@hotmail.com | personal |
| ... | ... | ... | ... | ... |
Obviously that list of email domains is simplified to make the concept easy. Here’s a full list of domain names that we consider personal (or burner).
To easily paste that list into your query, use delim.co, choose |
as the delimiter, and then paste into your query like so:
Try it yourself?
Run this template against our sample database that mirrors real startup data. See the connection credentials, then connect in PopSQL.
Spread the word
Tweet