Loading...
Alert Severity
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
Problem
The streaming infrastructure team is analyzing message ordering within each topic. For each message, show its offset, the previous message's offset within the same topic, its dense rank by offset within the topic, and its sequential row number within the topic. Only include messages that have a predecessor in the same topic.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.