reworked sql request processors, added sorting and added tests