Hello,
I'm finally losing what's left of my mind, all thanks to what should be simple query (which is probably breaking all the rules of MySQL).
Here's the scoop: got a simple left join query:
Essentially, I'm looking for all the users who DIDN'T have anything in the user_activity table.
I thought about doing something with a separate query to get everyone who *did* have an activity recorded, and then run a "not in" command against that, but that just seems messy.
Any ideas?
Thanks!
Inger
I'm finally losing what's left of my mind, all thanks to what should be simple query (which is probably breaking all the rules of MySQL).
Here's the scoop: got a simple left join query:
Code:
select users.uId, user_activity.ua_uId
from users left join user_activity
on users.uId = user_activity.ua_uId
where user_activity.ua_uId = NULL;
Essentially, I'm looking for all the users who DIDN'T have anything in the user_activity table.
I thought about doing something with a separate query to get everyone who *did* have an activity recorded, and then run a "not in" command against that, but that just seems messy.
Any ideas?
Thanks!
Inger