Thumbtack Interview Question

SQL round can get a bit tricky given that the interview is somewhat short (30 mins)