SELECT kaynak, ip FROM
(SELECT kaynak, ip, COUNT(*) OVER (PARTITION BY ip) as T FROM ziyaretciler GROUP BY kaynak, ip) UI WHERE T > 1 AND kaynak LIKE '%yandex%' ORDER BY ip;