Прикарпатські поліцейські стали донорами крові для хворих діток


DELETE t1 FROM news t1 INNER JOIN news t2 WHERE t1.id < t2.id AND t1.permalink = t2.permalink; SELECT name, LENGTH(permalink) AS mlen FROM news ORDER BY mlen DESC LIMIT 1 2 3 4 5 6 7 8 9 10 11 12 13 SELECT id FROM (SELECT id, ROW_NUMBER() OVER (PARTITION BY permalink ORDER BY email) AS row_num FROM news) t WHERE row_num > 1; DELETE n.* FROM news n WHERE id IN (SELECT id FROM (SELECT MIN(id) as id FROM news n2 GROUP BY permalink HAVING COUNT(*) > 1) x);