Implemented order by clause restrictions