Question: How many respondents who are currently using which synchronous tool want to use which synchronous tool in the future?
SQL:
SELECT OfficeStackSync.name, COUNT(OfficeStackSync.id) * 100.0 / (SELECT COUNT(DISTINCT Response_OfficeStackSyncHaveWorkedWith.Response_id) FROM Response_OfficeStackSyncHaveWorkedWith JOIN Responses ON Responses.id = Response_OfficeStackSyncHaveWorkedWith.Response_id WHERE Responses.ResponderDescription = 'I am a developer by profession') FROM OfficeStackSync JOIN Response_OfficeStackSyncHaveWorkedWith ON OfficeStackSync.id = Response_OfficeStackSyncHaveWorkedWith.OfficeStackSync_id JOIN Responses ON Responses.id = Response_OfficeStackSyncHaveWorkedWith.Response_id WHERE Responses.ResponderDescription = 'I am a developer by profession' GROUP BY OfficeStackSync.name
SELECT OfficeStackSyncHaveWorkedWith.Name AS CurrentTool, OfficeStackSyncWantToWorkWith.Name AS FutureTool, COUNT(*) AS Respondents FROM Response_OfficeStackSyncHaveWorkedWith JOIN Response_OfficeStackSyncWantToWorkWith ON Response_OfficeStackSyncHaveWorkedWith.Response_id = Response_OfficeStackSyncWantToWorkWith.Response_id JOIN OfficeStackSync AS OfficeStackSyncHaveWorkedWith ON Response_OfficeStackSyncHaveWorkedWith.OfficeStackSync_id = OfficeStackSyncHaveWorkedWith.id JOIN OfficeStackSync AS OfficeStackSyncWantToWorkWith ON Response_OfficeStackSyncWantToWorkWith.OfficeStackSync_id = OfficeStackSyncWantToWorkWith.id GROUP BY CurrentTool, FutureTool