Question: What miscellaneous framework do how many participants want to use and what are they using currently?
SQL:
SELECT MiscTech1.name AS have_worked_with, MiscTech2.name AS want_to_work_with, COUNT(*) FROM Response_MiscTechHaveWorkedWith JOIN MiscTech AS MiscTech1 ON Response_MiscTechHaveWorkedWith.MiscTech_id = MiscTech1.id JOIN Response_MiscTechWantToWorkWith ON Response_MiscTechWantToWorkWith.Response_id = Response_MiscTechHaveWorkedWith.Response_id JOIN MiscTech AS MiscTech2 ON Response_MiscTechWantToWorkWith.MiscTech_id = MiscTech2.id GROUP BY MiscTech1.name, MiscTech2.name
SELECT MiscTech.Name AS Framework, COUNT(DISTINCT Response_MiscTechHaveWorkedWith.Response_id) AS CurrentUsers, COUNT(DISTINCT Response_MiscTechWantToWorkWith.Response_id) AS FutureUsers FROM MiscTech LEFT JOIN Response_MiscTechHaveWorkedWith ON MiscTech.id = Response_MiscTechHaveWorkedWith.MiscTech_id LEFT JOIN Response_MiscTechWantToWorkWith ON MiscTech.id = Response_MiscTechWantToWorkWith.MiscTech_id GROUP BY MiscTech.Name