How can I only return the first distinct match of a field in MySQL?
My Table:
name hash ---------------- Anna ABC Barb DEF Charlie GHI A
try this
SELECT name , hash FROM my_table WHERE name LIKE '%An%' GROUP BY name;
DEMO SQLFIDDLE HERE