私はこのテーブルを持っています:
select count(distinct clean_deep_link) from tbl_1;
+---------------------------------+
| count(distinct clean_deep_link) |
+---------------------------------+
| 121211 |
+---------------------------------+
私はこのクエリを持っています:
select count(1) from tbl_1 where clean_deep_link IN
(select clean_deep_link from tbl_2);
+----------+
| count(1) |
+----------+
| 66360 |
+----------+
しかし、クエリを変更するnot in
と、空のセットが返されます:
select count(1) from tbl_1
where clean_deep_link not in (select clean_deep_link from tbl_2);
+----------+
| count(1) |
+----------+
| 0 |
+----------+
これはどのように可能ですか?サブクエリにレコードの約半分が含まれている場合、サブクエリの にnot
残りの半分を含めるべきではありませんか? ここで何が欠けていますか?
ありがとう