This challenge was a bit tricky, but quite interesting, so I thought it would be a good topic to talk about and walk through its solution, along with the thought process I applied to build the solution query from scratch.

If you find this article useful or simply enjoy reading it, don’t forget to clap! Or even leave a comment. Authors are always happy about claps and feedback, and it is a great way to let us know we are writing useful articles for you :-)

It makes use of subquery, aggregation with the “group by” clause, sorting using the…

Cristina Sahoo

I am a Data Scientist with 10+ years experience in the Tech Industry, and a background in Education and Customer Service.

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store