TomTom interview question

sql query