moved sql to sql