Root Inc. Interview Question

Sorting data in SQL