![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/12/2008, 02:48
|
![Avatar de dogduck](http://static.forosdelweb.com/customavatars/avatar125116_1.gif) | | | Fecha de Ingreso: enero-2006 Ubicación: ¿Atlantida, Hesperides, Islas afortunadas?
Mensajes: 2.231
Antigüedad: 19 años, 1 mes Puntos: 19 | |
Respuesta: Consulta. Registros por sexo Intentalo con la union.
Consulta A:
Select "Matematicas", count(sexo) as H from tabla where ano="2007" and sexo="H" and estudio="Matematicas";
Consulta B:
Select "Matematicas", count(sexo) as M from tabla where ano="2007" and sexo="M" and estudio="Matematicas";
Solucion: (A) UNION (B);
Salu2 |