Root Inc. interview question

Sorting data in SQL