To tylko proste zapytanie obejmujące JOIN
:
SELECT users.uid, users.uname, COUNT(logs.logid) AS logins
FROM users
LEFT JOIN logs ON logs.uid=users.uid
GROUP BY users.uid
ORDER BY logins DESC
To tylko proste zapytanie obejmujące JOIN
:
SELECT users.uid, users.uname, COUNT(logs.logid) AS logins
FROM users
LEFT JOIN logs ON logs.uid=users.uid
GROUP BY users.uid
ORDER BY logins DESC