working on search sql