SELECT
  k.klientasid,
  k.kodas,
  k.vardas,
  k.pavarde,
  s.sutartisid,
  s.sutartiesid,
  s.data
FROM klientas k
JOIN sutartis s ON s.klientasid = k.klientasid
WHERE k.klientasid IN (
  SELECT k2.klientasid
  FROM klientas k2
  JOIN sutartis s2 ON s2.klientasid = k2.klientasid
  GROUP BY k2.klientasid
  HAVING COUNT(*) > 1
)
ORDER BY k.klientasid;
