SELECT * FROM MainTable.Code.Surname.Name.Sum ORDER BY Sum;
SELECT Code, Surname, Name, Sum FROM MainTable ORDER BY Sum;
SELECT * FROM MainTable ORDER BY 4