I have the following query which works except that I would like it to behave differently. Now it looks for all the duplicate rows on url
and returns it in the order of number of duplicate urls. I use GROUP_ CONCAT to seperate all the different screen_name's.
However there can be multiple rows with the same url and same screen_name. How do I make it so that it only retreives the rows where screen_name is distinct.
SELECT url, title, GROUP_CONCAT( screen_name ) , COUNT( t_uid )
FROM `twl_links`
WHERE twl_uid =3
AND timestamp >= NOW( ) - INTERVAL 24 HOUR
GROUP BY (
url
)
ORDER BY COUNT( t_uid ) DESC
Thank you very much,
Ice