#155 sql pull order by fix