Kevadiya interview question

SQL queries DB Structure for given scenario Sorting program