Combine Two Tables
A easy-tier problem at 78% community acceptance, tagged with Database. Reported in interviews at Microsoft and 0 others.
Combine Two Tables is the SQL warm-up that shows up in Microsoft's hiring pipeline and catches people who haven't written a JOIN in months. With a 78% acceptance rate, it looks trivial on the surface. It's not a trick problem, but it's the foundation for every multi-table query you'll write in a real system. If you blank on JOIN syntax or mess up the join condition during your assessment, StealthCoder surfaces the working query in seconds, invisible to the proctor. This is the problem you drill so you don't waste mental energy on it when stakes are high.
Companies that ask "Combine Two Tables"
Combine Two Tables 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. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know.
Get StealthCoderThe core pattern here is understanding INNER vs LEFT JOIN and knowing when each one applies. Most candidates default to INNER JOIN and miss rows from one table entirely. The problem forces you to think about cardinality and null handling. If you're joining a Person table to an Address table and not all people have addresses, a LEFT JOIN is the hedge. The gotcha isn't algorithmic complexity, it's remembering the syntax and logic under pressure. During a live assessment, if you hesitate on the join type or table aliases, StealthCoder runs invisibly and gives you the correct query structure in real time. That's the difference between flagging on the first question and moving to harder problems with mental energy intact.
Pattern tags
You know the problem.
Make sure you actually pass it.
Combine Two Tables 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. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Combine Two Tables interview FAQ
Why does Combine Two Tables show up in interviews if it's marked easy?+
It's a filter. SQL is fundamental to backend and data roles at scale. Microsoft and other companies ask it early to confirm you can write basic joins without stalling. 78% pass rate means 22% don't, usually from rustiness or syntax blanks, not conceptual gaps.
What's the difference between INNER JOIN and LEFT JOIN for this problem?+
INNER JOIN returns only rows where both tables match. LEFT JOIN returns all rows from the left table, filling nulls for unmatched right-side columns. If you want every person with or without an address, LEFT JOIN is correct. INNER JOIN drops people with no address.
How should I approach the join condition?+
Match on the foreign key relationship. If Person has a PersonId and Address has a PersonId, join ON Person.PersonId = Address.PersonId. Table aliases (Person p, Address a) make the query cleaner and avoid ambiguity when column names overlap.
Is this problem still asked at Microsoft?+
Yes. It's in their reported interview questions. Easy doesn't mean irrelevant. Companies use foundational SQL questions to calibrate communication and catch gaps. Nailing it fast builds confidence for harder problems.
What happens if I freeze on the syntax during the OA?+
StealthCoder runs invisibly during your screen share and supplies the correct JOIN syntax and table structure in real time. You paste it, move forward, and don't waste the assessment on a warm-up you could drill offline.
Want the actual problem statement? View "Combine Two Tables" on LeetCode →