udpated sql