Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/10/2012, 14:37
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: ¿Es posible esto?

Código MySQL:
Ver original
  1.  id_producto,
  2. COUNT(DISTINCT id_tag) valor
  3.  FROM `relacion_tags`
  4.     WHERE ` id_tag` IN ('5', '12')
  5.        GROUP BY id_producto
  6.        HAVING valor = 2