added a query to drop the temporary tables