Loading...
The Table Thief
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid, senior
Problem
Write a function that takes a SQL query string and extracts all table names referenced in FROM and JOIN clauses. Return the names as a sorted list with no duplicates. Assume simple identifiers with no schema prefix; aliases may follow.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.