Pergunta de entrevista da empresa Société Générale

how to sort data without order by option?