Question: Is the mean years of experience higher for People Manager than Individual Contributors? Return 1 if true otherwise return 0.
SQL:
WITH avgworkexp AS (SELECT IndividualContributorOrPeopleManager, AVG(WorkExp) AS avg_exp FROM Responses WHERE NOT WorkExp IS NULL AND NOT IndividualContributorOrPeopleManager IS NULL GROUP BY IndividualContributorOrPeopleManager) SELECT (SELECT avg_exp FROM avgworkexp WHERE IndividualContributorOrPeopleManager = 'People manager') > (SELECT avg_exp FROM avgworkexp WHERE IndividualContributorOrPeopleManager = 'Individual contributor') AS result