Isracard interview question

write query to get 1,2,3