Symmetric Reply Network
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant feedback.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L3
Problem
The `chat_msgs` table logs team chat activity, where a reply stores the user ID of the person being replied to in `reply_to` while an original post leaves it empty. Map the symmetric reply network: whenever one person replied to another, list that pair of user IDs in both directions.
Summary
Every reply is an edge. Draw it both ways.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and checks it automatically.