Find Users With Valid E-Mails
A easy-tier problem at 44% community acceptance, tagged with Database. Reported in interviews at Shopify and 0 others.
You're staring at a Database problem on your Shopify OA and the acceptance rate is 44%. That's not a trick problem, it's a filtering problem that trips up candidates who overthink it or don't know the exact regex or string-matching syntax their SQL dialect supports. Find Users With Valid E-Mails is straightforward in concept but asks you to validate email format in SQL, which means either regex, string functions, or both. Most candidates either write brittle pattern matches or forget edge cases. If this lands on your assessment and you blank on the syntax, StealthCoder surfaces a working query in seconds, invisible to the proctor.
Companies that ask "Find Users With Valid E-Mails"
Find Users With Valid E-Mails is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop.
Get StealthCoderThe core task: filter a users table to return only rows where the email column matches a valid email format. The trick isn't algorithmic, it's knowing your SQL dialect's tools. Some databases give you regex (like MySQL's REGEXP or PostgreSQL's ~), others force you into string function chains (LIKE, SUBSTRING, INSTR). The gotcha is that email validation in SQL is always imperfect. You'll either see a simple pattern like '%@%.%' or get hit with stricter rules: no leading/trailing spaces, exactly one @, domain has a dot, no consecutive dots. The acceptance rate (44%) suggests many submissions fail on edge cases or syntax. If you're prepping, test your chosen regex or string logic against malformed inputs. During the live OA, if the query syntax eludes you or you're unsure about your database's regex support, StealthCoder hands you the correct query immediately, letting you move on.
Pattern tags
You know the problem.
Make sure you actually pass it.
Find Users With Valid E-Mails recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Find Users With Valid E-Mails interview FAQ
Is this problem still asked at Shopify?+
Yes. The data shows Shopify has asked it. It's a straightforward filtering task that fits their backend assessment style. Expect it in any Shopify database or SQL screening round.
What's the main trick?+
There isn't an algorithmic trick. The challenge is knowing your SQL dialect's regex or string functions well enough to write a correct pattern without fumbling the syntax. Most failures come from incorrect regex or forgetting edge cases like spaces and multiple @ symbols.
Why is the acceptance rate only 44%?+
Low acceptance usually means syntax errors, regex mistakes, or missing edge cases. Candidates either write overly simple patterns that accept invalid emails or get tripped up by their SQL dialect's specific regex or string function syntax and rules.
Do I need to memorize email regex?+
No. The problem tells you what constitutes valid. Read the constraints carefully. Usually it's basic rules like 'alphanumerics and dot before @, domain after @'. Your SQL's built-in functions or simple LIKE patterns usually suffice without complex regex.
How long should this take in a real OA?+
Once you know the syntax, 5 to 10 minutes. If you're unsure about your database's regex support or pattern matching, you'll waste time debugging. That's where having a working template or solution matters.
Want the actual problem statement? View "Find Users With Valid E-Mails" on LeetCode →