SELECT name, MIN(colnum) as cn FROM col group by name
HAVING name
LIKE '%$q%'
Didn’t work, got same messages on same row.
About delete, don’t want remove anything just not show/print duplicates from name. This work with GROUP BY name. What I want is, it prints after lowest value in colnum. As I understand GROUP BY name selects first, value "A" it founds in table if table looks like this:
name------colnum
B-----------5
B-----------3
A-----------7
A-----------4
A-----------8
output will be like this I think:
name-----colnum
A----------7
but want have output like this with lowest value "4".
name-----colnum
A----------4