Search doctor sql finished and tested