updated sql query strings.