Question: What % of people who responded want to use a specific asynchronous communication tool by communication tool?
SQL:
SELECT OfficeStackAsync.name, COUNT(OfficeStackAsync.id) * 100.0 / (SELECT COUNT(DISTINCT Response_id) FROM Response_OfficeStackAsyncWantToWorkWith) FROM OfficeStackAsync JOIN Response_OfficeStackAsyncWantToWorkWith ON Response_OfficeStackAsyncWantToWorkWith.OfficeStackAsync_id = OfficeStackAsync.id GROUP BY OfficeStackAsync.id
SELECT OfficeStackAsync.Name, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Responses) AS Percentage FROM Response_OfficeStackAsyncWantToWorkWith JOIN OfficeStackAsync ON Response_OfficeStackAsyncWantToWorkWith.OfficeStackAsync_id = OfficeStackAsync.id GROUP BY OfficeStackAsync.Name