Eddited sql script