Infosys Interview Question

A SQL query was given. Some questions on operating systems, DBMS, C++. Explain and write code for sorting algorithm.