1 2 3 4 5 6 7 8 9
| select (q2.num_prat2 / q1.num_prat1)*100 from (
SELECT count(num_prat) as num_prat1
FROM Report_Costi.DETTAGLIO_SDO D
where anno='2007' and disciplina not in ('06', '07', '09', '10', '11', '12', '13', '14', '30', '34', '35', '36', '38', '43', '76', '78')
and intervento not like '985%' and cat_0 like 'ORD%' and drg_tipo <> '470') q1 cross join (
SELECT count(num_prat) as num_prat2
FROM Report_Costi.DETTAGLIO_SDO D
where anno='2007' and disciplina not in ('06', '07', '09', '10', '11', '12', '13', '14', '30', '34', '35', '36', '38', '43', '76', '78')
and intervento not like '985%' and drg_tipo like 'M' and cat_0 like 'ORD%') q2 |
Partager