[英]How do I structure a sub query for this table?
I have a table that will always have a row for the en-US culture.我有一张桌子,总是有一行代表美国文化。 I am trying to write a query that will give me results for rows that do not also contain es or fr-CA.
我正在尝试编写一个查询,该查询将为我提供不包含 es 或 fr-CA 的行的结果。 Could anyone point me in the right direction?
谁能指出我正确的方向?
TextKey![]() |
Culture![]() |
---|---|
DutyType.SigningCeremonyOnly ![]() |
en-US ![]() |
DutyType.SigningCeremonyOnly ![]() |
es ![]() |
DutyType.SubmitOnly ![]() |
es ![]() |
DutyType.SubmitOnly ![]() |
en-US ![]() |
DutyType.SubmitOnly ![]() |
fr-CA ![]() |
You seem to be asking for:您似乎在要求:
select t.*
from t
where not exists (select 1
from t t2
where t2.textkey = t.textkey and t2.culture in ('es', 'fr-CA')
);
I'm not sure why it is relevant that rows exist for en-US
.我不确定为什么
en-US
存在行是相关的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.