Question: How many users want to keep using their technical tool in % and by tool?
SQL:
SELECT TechTools.name, COUNT(TechTools.id) * 100.0 / count2 FROM TechTools JOIN Response_ToolsTechHaveWorkedWith ON Response_ToolsTechHaveWorkedWith.TechTools_id = TechTools.id JOIN Response_ToolsTechWantToWorkWith ON Response_ToolsTechWantToWorkWith.Response_id = Response_ToolsTechHaveWorkedWith.Response_id AND Response_ToolsTechWantToWorkWith.TechTools_id = TechTools.id JOIN (SELECT TechTools.name AS name2, COUNT(TechTools.id) AS count2 FROM TechTools JOIN Response_ToolsTechHaveWorkedWith ON Response_ToolsTechHaveWorkedWith.TechTools_id = TechTools.id GROUP BY TechTools.id) ON TechTools.name = name2 GROUP BY TechTools.id