Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/02/2006, 09:46
Avatar de HIa
HIa
 
Fecha de Ingreso: noviembre-2002
Ubicación: Cartago
Mensajes: 121
Antigüedad: 21 años, 6 meses
Puntos: 0
pues al final la respuesta a mi problema fue esta....
Código:
SELECT ig.profile_gender_name_en, count(distinct(ip.uid))
FROM i_profile ip, i_profile_gender ig, i_subprofile_1 ipg1, i_subprofile_2 ipg2, i_subprofile_3 ipg3
WHERE 
(ip.uid = ipg1.uid  AND ipg1.photo_status_id <> '0' and ip.profile_gender_id = ig.profile_gender_id) or
(ip.uid = ipg2.uid  AND ipg2.photo_status_id <> '0' and ip.profile_gender_id = ig.profile_gender_id) or 
(ip.uid = ipg3.uid  AND ipg3.photo_status_id <> '0' and ip.profile_gender_id = ig.profile_gender_id)
GROUP BY  ig.profile_gender_name_en
Pareciera que no es la mejor implementación, pero bueno me tira el total de usuarios por sexo y eso es mi goal.... vamos a ver como se comporta en el app real :D

Código:
 profile_gender_name_en   	  count( distinct ( ip . uid ) )
Couple 	1
Female 	3
Male 	3
pero gracias por tu ayuda ^_^
__________________
Siempre hay algo nuevo que aprender