Problem Description

Assume order_id should be continuous. Using a helper Numbers(n) table, list the missing order_id between MIN(order_id) and MAX(order_id).

Input Format

SQL query

Output Format

Result set

Sample Test Case

Input:
Orders(order_id), Numbers(n) 1..N
Output:
Missing ids

Constraints

Think: generate range then remove existing ids

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next