SQL Query查找哪个组没有给定值

Nat*_*Pet 2 sql

我正在使用T-SQL.

说如果我有以下内容

Value     Nbr
-----     ---
one       6
one       7
one       8
two       6
two       7
three     5
three     3
three     2
Run Code Online (Sandbox Code Playgroud)

在上表中,我需要找到哪个组中没有6个.在这种情况下,它是三,因为它没有6.

这样做的最佳方法是什么?

我试过了:

      select Value from tbl1 
      where nbr <> 6
      group by Value 
Run Code Online (Sandbox Code Playgroud)

但没有得到预期的结果.

小智 5

select distinct value
from tbl1
where value not in
(
    select distinct value
    from tbl1
    where nbr = 6
)
Run Code Online (Sandbox Code Playgroud)