This is what my table looks like
Measure PT Name
Expired Mickey Mouse
Expired Donald Duck
Alive Big Bird
Alive Baby Bird
Rehab Daffy Duck
Xray Goofy
I want it to look like this:
Measure Count %
Expired 15 40%
Alive 5 13%
Rehab 7 18%
Xray 10 27%
I made a mistake, I want to get a count grouped by Measure
including a % all in the same SQL statement
Select DischargeDisp, Count(*) as TotalCnt
INTO #Measure
from #LOS
group by DischargeDisp