SQL - URGENTE-ayuda

 
Vista:

URGENTE-ayuda

Publicado por NESTOR (8 intervenciones) el 07/10/2008 02:37:58
Hola compañeros:

Tengo la siguiente consulta:
++++++++++++
select x.cod_tipo_movimiento , x.cod_razon
from
su_masuscripciones x
where
x.usr_registra in('ROBERTO ROMÁN','MARIA ELENA GONZALEZ','FREDDY PORRAS','ALEX SÁNCHEZ','STEVEN TREJOS',
'KARLA ROJAS','KAREN SEGURA','SILVIA COSIO','ABIGAIL PEÑA','YACANOMIN GUTIÉRREZ')
and
x.fec_registro between '01-sep-2008' and '30-sep-2008'
++++++++++
Lo que necesito es conocer la cantidad por cod_tipo_movimiento , cod_razon.

Si utilizo un DISTINCT conosco las combinaciones. Entonces de dichas combinaciones necesito saber cuanto tengo en la consulta anterior.

He utilizado COUNT pero me muestra la cantidad total de los registros. Necesito el total de registros segun la convinacion del DISTINCT:
+++++++++++
select distinct x.cod_tipo_movimiento , x.cod_razon
from
su_masuscripciones x
where
x.usr_registra in('ROBERTO ROMÁN','MARIA ELENA GONZALEZ','FREDDY PORRAS','ALEX SÁNCHEZ','STEVEN TREJOS',
'KARLA ROJAS','KAREN SEGURA','SILVIA COSIO','ABIGAIL PEÑA','YACANOMIN GUTIÉRREZ')
and
x.fec_registro between '01-sep-2008' and '30-sep-2008'
+++++++++
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder