finished sql issues