Candidate Labs interview question

How would you create this graph in an analytics tool with SQL?