Gaps in Sequential IDs
Hard
Advanced Queries
Return the missing ids in a table whose ids should run from the minimum to the maximum without gaps. Return them ordered ascending in a column named missing_id.
Table schema
Tickets(id INT PRIMARY KEY)Sample data
id
1
2
4
7
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.