Question: What cloud platform do how many professional developers want to use and what are they currently using?
SQL:
SELECT Platforms1.name AS have_worked_with, Platforms2.name AS want_to_work_with, COUNT(*) FROM Response_PlatformHaveWorkedWith JOIN Platforms AS Platforms1 ON Response_PlatformHaveWorkedWith.Platforms_id = Platforms1.id JOIN Response_PlatformWantToWorkWith ON Response_PlatformWantToWorkWith.Response_id = Response_PlatformHaveWorkedWith.Response_id JOIN Platforms AS Platforms2 ON Response_PlatformWantToWorkWith.Platforms_id = Platforms2.id JOIN Responses ON Response_PlatformWantToWorkWith.Response_id = Responses.id WHERE Responses.ResponderDescription = 'I am a developer by profession' GROUP BY Platforms1.name, Platforms2.name
SELECT Platforms.Name AS CloudPlatform, COUNT(*) AS NumberOfDevelopers FROM Response_PlatformWantToWorkWith JOIN Responses ON Responses.id = Response_PlatformWantToWorkWith.Response_id JOIN Platforms ON Platforms.id = Response_PlatformWantToWorkWith.Platforms_id WHERE Responses.ResponderDescription = 'I am a developer by profession' GROUP BY Platforms.Name UNION SELECT Platforms.Name AS CloudPlatform, COUNT(*) AS NumberOfDevelopers FROM Response_PlatformHaveWorkedWith JOIN Responses ON Responses.id = Response_PlatformHaveWorkedWith.Response_id JOIN Platforms ON Platforms.id = Response_PlatformHaveWorkedWith.Platforms_id WHERE Responses.ResponderDescription = 'I am a developer by profession' GROUP BY Platforms.Name