Tuesday, 20 July 2021

sql group by

 


add sql total staff and sub and percentage it with round values.

 SELECT BRANCH, SUM(TotalStaff)AS TotalStaff ,

  SUM (SCRESSubscription)as SCRESSubscription,

CAST( ROUND(sum(SCRESSubscription) * 100.0 / sum( TotalStaff),2)as decimal(5,2)) as Percentage



  FROM BranchWiseDataBZANew21062021

  GROUP BY BRANCH 





No comments:

Post a Comment

API run block issue run api from cmd

  ✅ Debug Checklist – “Access is Denied” (.NET / Visual Studio) 🔹 Identify Problem ☐ Error: Unable to start program (.exe) – Access is deni...