Infosys Interview Question

bubble sort and sql queries