fix sql select route