Query the WordPress database to get data together with replaced information

This query worked for me. I had to reverse it, starting at the user and then matching the post ID. You would need to replace the value of wp_posts.ID of course.

SELECT wp_users.ID
FROM wp_users
LEFT JOIN wp_postmeta ON wp_postmeta.meta_value = wp_users.user_email AND wp_postmeta.meta_key = '_from_email' 
LEFT JOIN wp_posts ON wp_posts.ID = wp_postmeta.post_id AND wp_posts.ID = 2