Question: How many users in % want to use a web technology by web technology?
SQL:
SELECT WebFrameworks.name, COUNT(WebFrameworks.id) * 100.0 / (SELECT COUNT(DISTINCT Response_id) FROM Response_WebFrameWantToWorkWith) FROM WebFrameworks JOIN Response_WebFrameWantToWorkWith ON Response_WebFrameWantToWorkWith.WebFrameworks_id = WebFrameworks.id GROUP BY WebFrameworks.id
SELECT WebFrameworks.Name, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Responses) AS Percentage FROM Response_WebframeWantToWorkWith JOIN WebFrameworks ON Response_WebframeWantToWorkWith.WebFrameworks_id = WebFrameworks.id GROUP BY WebFrameworks.Name