Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/02/2006, 03:37
desoweb
 
Fecha de Ingreso: enero-2006
Mensajes: 22
Antigüedad: 19 años, 1 mes
Puntos: 0
Para poder contar el numero de registros que poseen esa característica, debes aplicar la funcion count.
Tu query quedaria de la siguiente forma:
SELECT ig.profile_gender_name_en, count(ip.uid)
FROM i_profile ip, i_profile_gender ig, i_subprofile_1 ipg1, i_subprofile_2 ipg2, i_subprofile_3 ipg3
WHERE
(ipg1.uid = ip.uid AND ipg1.photo_status_id <> '0') OR
(ipg2.uid = ip.uid AND ipg2.photo_status_id <> '0') OR
(ipg3.uid = ip.uid AND ipg3.photo_status_id <> '0') AND
ip.profile_gender_id = ig.profile_gender_id
GROUP BY ig.profile_gender_name_en, ip.uid

Espero que te sirva de ayuda,
Salu2.