如何解决这个世界上非官方语言的SQL查询? [关闭]

问题描述 投票:-4回答:1

我怎么知道没有官方语言的国家/地区?

enter image description here

sql model relational
1个回答
0
投票

此查询将覆盖所有国家/地区,并在countrylanguage表中没有条目的情况下查找一次,并且其中一行包含isOffical true列。

Select count(distinct Code) 
from country a 
where not exists (select 1 from countrylanguage b 
                  where a.Code = b.Country and isOfficial = 1)
© www.soinside.com 2019 - 2024. All rights reserved.