Question: By what percentages of participants are the online resources used?
SQL:
SELECT LearningToCodeOnlineResources.name, COUNT(LearningToCodeOnlineResources.id) * 100.0 / (SELECT COUNT(DISTINCT Response_id) FROM Response_LearningToCodeOnlineResources) FROM LearningToCodeOnlineResources JOIN Response_LearningToCodeOnlineResources ON LearningToCodeOnlineResources.id = Response_LearningToCodeOnlineResources.LearningToCodeOnlineResources_id GROUP BY LearningToCodeOnlineResources.id
SELECT LearningToCodeOnlineResources.Name, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Responses) AS Percentage FROM Response_LearningToCodeOnlineResources JOIN LearningToCodeOnlineResources ON Response_LearningToCodeOnlineResources.LearningToCodeOnlineResources_id = LearningToCodeOnlineResources.id GROUP BY LearningToCodeOnlineResources.Name