-1
select Priority, 
  case Priority 
    when 'Medium' then (Count(*)* 100 / (Select Count(*) From #tem where Priority = 'Medium')) 
    when 'High' then (Count(*)* 100 / (Select Count(*) From #tem where Priority = 'High')) 
    when 'Low' then (Count(*)* 100 / (Select Count(*) From #tem where Priority = 'Low')) 
    when 'Critical' then (Count(*)* 100 / (Select Count(*) From #tem where Priority = 'Critical')) 
  end as '% SLM Met' 
from #tem where Bool = 'True' 
group by Priority
order by 
  case Priority
     WHEN 'Critical' THEN 1
     WHEN 'High' THEN 2
     WHEN 'Medium' THEN 3
     WHEN 'Low' THEN 4
   End

これをlinqに変換するにはどうすればよいですか..

UI を正しく表示するために、この順序を指定したいと思います。

4

2 に答える 2