fixed drop sql query