removing sql query that can't work