I have a table type:
id | text | tel | time
----------------------------
1 | text1 | tel1 | unixtime
2 | text1 | tel1 | unixtime
3 | text1 | tel1 | unixtime
4 | text2 | tel2 | unixtime
5 | text3 | tel3 | unixtime
6 | text3 | tel3 | unixtime
I want it "clean", try to delete all rows where is text
= tel
, and leave one with the largest time
. I began like this:
SELECT concat(`text`, `tel`),
count(concat(`text`, `tel`))
FROM `ads` GROUP by concat(`text`, `tel`)
Having count(concat(`text`, `tel`)) > 1
something as something works, but something all wrong: (but still I can not guess how to remove, leaving only a one record of repeating ... anyone have any ideas, please write!