SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1)
Temukan deskripsi peran paling populer di antara pengguna yang telah masuk.
CREATE TABLE users (role_description VARCHAR, role_code VARCHAR, user_login VARCHAR); CREATE TABLE ROLES (role_description VARCHAR, role_code VARCHAR, user_login VARCHAR)