busboy — 2012-08-17T20:24:51-04:00 — #1
I must be overlooking something. The following query returns 432 rows:
select * from users where sponsorID = '0' and sponsorUpdated is not null and uID not in (select uID from communications where type = 'Account Change' and entry like '%be 110%') limit 5000;
This join produces 23 results:
select count(*) from users u join communications c on u.uID = c.uID where u.sponsorID = '0'
and u.sponsorUpdated is not null and c.entry like '%110%';
r937 — 2012-08-17T22:29:29-04:00 — #2
the first query is actually an "exception" join -- rows from the users table that don't have a matching row in the communications table
the second query is a conventional inner join -- rows from the users table that do have a matching row in the communications table
i'm not sure what it is that you were wondering about
mittineague — 2014-09-18T23:33:54-04:00 — #3
This topic is now archived. It is frozen and cannot be changed in any way.