fix sql order