title: Aggregation in SQL to calculate sum and percentage
body: <p>I have this data in my database which shows how many users have been invited and participated, and I want to calculate the following:</p>
  
  <p>1- Total invitations <strong>(sum of count)</strong>.<br>
  2- Participated <strong>(sum of allowed, to_be_paid, already_paid)</strong>.<br>
  3- Responded <strong>(sum of allowed, to_be_paid, already_paid, user_declined, user_willing)</strong>.<br>
  4- No response <strong>(sum of expired, offered)</strong>.<br>
  5- Response rate <strong>(responded/ total*100)</strong>.<br>
  6- Participation rate <strong>(participated / total*100)</strong>.   </p>
  
  <p><img src="https://i.stack.imgur.com/WmUtx.png" alt="Table view"></p>
  
  <p>I want to be able to get result like this:</p>
  
  <p><img src="https://i.stack.imgur.com/MZSqx.png" alt="Final result"></p>