Siemens interview question

Joins in SQL Bubble sort algorithm