Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT kca.nom_categoria,COUNT(avi.id_aviso) AS n
- FROM KO_AVISO AS avi
- INNER JOIN KO_AVISO_CATEGORIA AS kac ON kac.ID_AVISO = avi.ID_AVISO
- INNER JOIN KO_CATEGORIA_ARBOL AS kca ON kca.ID_CATEGORIA = kac.ID_CATEGORIA
- WHERE
- avi.ID_UBIGEO = 15
- AND kca.ADULTO=0
- AND avi.EST=1
- AND avi.FLAG_MODERACION=0
- AND FLAG_MODERACION_ADMIN=0
- AND FEC_FIN>GETDATE()
- AND kca.ID_CATEGORIA IN (231,221,237,
- 243,235,208,228,
- 234,226,233,232,
- 244,230,1909,
- 229,1621,219,247,1381,
- 241,217,3489
- )
- GROUP BY kca.NOM_CATEGORIA ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement