select datename(month,Date)[Month],IsAttend[Attend] from tblAttend
select [monthname] as mo,[attend] as att from (select monthname ,attend from mon)ps pivot ( count(attend) for monthname in ([January],[February],[March]) )as pvt
select [monthname],[YES],[No] from (select * from mon )source pivot (count(attend) for attend in ([Yes],[No]))pt order by monthname
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)