Article SISAP: diferència entre les revisions

cap resum d'edició
Cap resum de modificació
Cap resum de modificació
Línia 8: Línia 8:
*Diferències segons utilització
*Diferències segons utilització
*Valors predictius indicadors tto (gold std: receptes recollides)
*Valors predictius indicadors tto (gold std: receptes recollides)
select a.indicador,a.any_carrega||decode(length(a.mes_carrega),1,'0'||a.mes_carrega,a.mes_carrega) data,poblacio,detectats,resolts from (
select decode(indicador,'AG05','12','AG08','21','AG13','08','AG18','14','AG20','05','AG16','11','AG23','29') indicador,any_carrega,mes_carrega,dem poblacio,decode(indicador,'AG23',dem,num) detectats from pdptb014 where indicador in ('AG05','AG08','AG13','AG18','AG20','AG16','AG23')
union
select '07' indicador,any_carrega,mes_carrega,dem poblacio,num detectats from pdptb014 where indicador = 'AG13'
) a
,(
select decode(indicador,'AG06','12','AG09','21','AG14','08','AG15','07','AG19','14','AG21','05','AG17','11','AG23','29') indicador,any_carrega,mes_carrega,num resolts from pdptb014 where indicador in ('AG06','AG09','AG14','AG15','AG19','AG21','AG17','AG23')
) b
where
a.indicador=b.indicador
and a.any_carrega=b.any_carrega
and a.mes_carrega=b.mes_carrega
union
select substr(indicador,-2),any_carrega||decode(length(mes_carrega),1,'0'||mes_carrega,mes_carrega) data,poblacio,decode(substr(indicador,-2),'29',poblacio,detectats),resolts from pdptb014 where any_carrega = '2007' and substr(indicador,-2) in ('12','21','08','07','09','14','15','05','06','11','29')
order by indicador,data