adding ideas for sorting SQL