updated sql for user role