7th Nearest Palindrome
Given the input_values table, find the seventh nearest palindrome for every nonnegative input value. Exclude the input value itself when it is already a palindrome. Order ties by the smaller palindrome, and exclude NULL and negative inputs.
input_id, target_value, seventh_nearest_palindrome, and distanceinput_id| Column | Type | Description |
|---|---|---|
| input_idPK | INT | Unique identifier for the input row |
| target_value | INT | Integer for which the seventh nearest palindrome is required |