removing unused sql