René Fournier <[EMAIL PROTECTED]> wrote on 07/30/2005 02:10:02 AM:
> Thanks, this is very helpful. I'm finally starting to understand
> Joins. But now I have a serious performance problem. Using INNER JOIN...
>
> SELECT users.*, COUNT(history.user_id) as num_events
> FROM users
> INNER JOIN hist
Thanks, this is very helpful. I'm finally starting to understand
Joins. But now I have a serious performance problem. Using INNER JOIN...
SELECT users.*, COUNT(history.user_id) as num_events
FROM users
INNER JOIN history ON (users.id = history.user_id)
GROUP BY users.user_name
ORDER BY id DESC