vanoman
03-02-2015, 13:36
Подскажите, пжлст, вот есть такая конструкция
case when success in (0) and [InterArchSuccess] in (1) then 'path_fail_category' else 'not_in' end as category
,count(*)
FROM [base].[dbo].[tools]
group by
case when success in (0) and [InterArchSuccess] in (1) then 'path_fail_category' else 'not_in' end
я просто получаю р-ты типа
category (No column name)
not_in 341783
path_fail_category 34942
а как в скуле высчитать не общее кол-во, а процент те. из 100% not_in 90%. a path fail 10%
case when success in (0) and [InterArchSuccess] in (1) then 'path_fail_category' else 'not_in' end as category
,count(*)
FROM [base].[dbo].[tools]
group by
case when success in (0) and [InterArchSuccess] in (1) then 'path_fail_category' else 'not_in' end
я просто получаю р-ты типа
category (No column name)
not_in 341783
path_fail_category 34942
а как в скуле высчитать не общее кол-во, а процент те. из 100% not_in 90%. a path fail 10%