Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

select not in not working

avatar
New Contributor

Hi all,

 

I am trying to get a list of IDs from a source while excluding a few select subjects.

 

so here are the queries:

 

select count(distinct idvar) from db1.source;

144252637

 

select count(distinct idvar) from db1.source where idvar in (select distinct idvar from db2.list);

 

710610

 

select count(distinct idvar) from db1.source where idvar not in (select distinct idvar from db2.list);

0

Please excuse the formatting in this message.  Something is not adding up here.  I would like some help please.

 

Thanks!

1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
1 REPLY 1

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login