Ver Mensaje Individual
  #15 (permalink)  
Antiguo 07/01/2013, 06:46
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: Ayudar con query sql

A ver esto (yo no lo he probado):
Código MySQL:
Ver original
  1.      t2.DNI
  2.         FROM tabla t2
  3.       INNER JOIN
  4.          (SELECT
  5.              IP,
  6.             COUNT(DISTINCT DNI) total
  7.                FROM tabla
  8.                 GROUP BY IP
  9.                       HAVING total > 1)t1
  10.       ON t2.IP = t1.IP ORDER BY t2.DNI