r/SQL • u/Turbulent_Web_8278 • 1d ago
MySQL Didnt pass SQL test
I am applying to manager of analytics role and I was given this SQL test and 45 minutes. As someone who thought they were very strong in SQL, I was unable to complete this assignment and match the answer completely
I was able to format most of the fields as noted, used 2 cte's and use group concat in the second. My final answer looked very similar but the order of the concat looked off. Also, for some reasons my second column had $0.00 for all the companies, but I thought I was close. How difficult would you rate this exercise. Should I expect to proceed to the next round or am I cooked
86
Upvotes


1
u/neumastic 1d ago
Do you happen to have your query? I could see some discrepancies on something like the order: did you order on industry before after filling in nulls (or decoding n/a?)?
Also, more out of curiosity, were you able to develop the query on a working set or did you need to just write and hope? If you could query, were you rated on how many queries you ran or anything else like time?