Esri Interview Question

A programming question: First duplicate character in a string, writing SQL query.