答案 0 :(得分:1)
使用not exists
:
select t.*
from t
where not exists (select 1
from t t2
where t2.id = t.id and t2.value = 'NaN'
);
如果您的值是浮点型,并且NaN
引用Postgres常量,则将逻辑写为:
where t2.id = t.id and t2.value = 'NaN'::float