Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

how to calculate percentage using count from 1 single bit type column

$
0
0

I have a table named attendance that has a column named Pre for marking Present as True and Absent as False.

i am using same column for marking both absent or present now the issue is i want to calculate percentage

i can create two virtual columns named TotalClasses and Attended i am also correctly getting values of both by using count.

but the problem is i want to apply percentage formula on these TotalClasses and Attended virtual columns to a third virtual column named Percentage but i am unable to think of any way to do this



Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>