Hi guys. I have a query I can't figure out hoping someone can point me in the right direction. I need to pull data from one table using a COUNT limit from another table.
select ID from tableA
But then I need to only produce results where the ID has a count limit from tableB.
Maybe I need a JOIN or something?
I'm trying something like this:
mysql_query("select id, username from tableA where id NOT IN (select count(field) as total from tableB HAVING count(field) <= '10')");
So tableA and tableB have IDs in them. We need a list from tableA but only want the list to include IDs that have less than 10 entries in tableB.
Thanks in advanced for any help you can provide!