Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- igpCapUE.[NombreSMMGP]
- ,igpCapUE.[UnidadEjecutora]
- ,1 as IGPFull
- ,(select top 1 sum([Cumpl_Físico_Calculado_Formateado]) over() /count(*) over()
- from [WK12DGPETL01].[Indicadores_ITEEP].[dbo].VW_UnidadEjecutoraProgramacionCumplimientoFormateado
- where cod_ue = igpCapUE.CodigoUnidadEjecutora COLLATE SQL_Latin1_General_CP1_CI_AS
- and Cod_Subcapitulo = '01'
- and Cod_Capitulo = '0101'
- and trimestre = 3
- and cod_periodo = '2018'
- ) as IGP01Eficacia
- ,1 as IGP02CorrectaPubPresu
- from
- (SELECT
- [Id] as SubIndicadoresCorrectasPublicacionesPresupuestariaId
- , IndiceGestionPresupuestariaId
- ,[FechaEvaluacion]
- ,[Comentarios]
- ,[CompletadoPorAnalistaNumeroPonche]
- ,[PublicaPresupuestoEnPlazoEstablecido]
- ,[UtilizaCorrectamenteClasificadoresPresupuestarios]
- ,[PresupuestoPublicoCoincideConSIGEF]
- ,[PublicaEjecucionEnPlazoEstablecido]
- ,[UtilizaCorrectamenteClasificadoresPresupuestariosS0205]
- ,[EjecucionPublicadaCoincideConSIGEF]
- ,[PuntuacionGenerada]
- ,3 as trimestre
- ,'2018' as periodo
- FROM [ColaboracionInterna].[dbo].[SubIndicadoresCorrectasPublicacionesPresupuestarias]
- where [IsDeleted] = 0
- ) as SubIgp
- join [dbo].VW_IGPWithCapAndUnidadEjecutora as igpCapUE
- on igpCapUE.[IndiceGestionPresupuestariaId] = SubIgp.IndiceGestionPresupuestariaId
- -- join [dbo].IndicesGestionesPresupuestarias as igp
- -- on igp.id = igpCap.IndiceGestionPresupuestariaId
- where FechaEvaluacion between
- case
- when trimestre = 1 then periodo + '-01-01'
- when trimestre = 2 then periodo + '-04-01'
- when trimestre = 3 then periodo + '-07-01'
- when trimestre = 4 then periodo + '-10-01'
- end
- and case
- when trimestre = 1 then periodo + '-03-31'
- when trimestre = 2 then periodo + '-06-30'
- when trimestre = 3 then periodo + '-09-30'
- when trimestre = 4 then periodo + '-12-31'
- end
- and CompletadoPorAnalistaNumeroPonche != 0
- group by SubIgp.IndiceGestionPresupuestariaId,
- igpCapUE.[IndiceGestionPresupuestariaId]
- ,igpCapUE.[IGPAnalistasCapSubCapUnidadesEjecutoraId]
- ,igpCapUE.[AnalistaCapSubCapUnidadEjecutoraId]
- ,igpCapUE.[NombreSMMGP]
- ,igpCapUE.[NormadoDIGEIG]
- ,igpCapUE.[TieneProductosSIGEF]
- ,igpCapUE.[TienePortalTransparencia]
- ,igpCapUE.[EjecutaSIGEF]
- ,igpCapUE.[CodigoCapitulo]
- ,igpCapUE.[CodigoSubCapitulo]
- ,igpCapUE.[CodigoUnidadEjecutora]
- ,igpCapUE.[UnidadEjecutora]
- ,SubIgp.periodo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement