@xuminxz,正解。
SELECT a.国家,a.人口 as 女,b.人口 as 男 from ccc a JOIN ccc b ON a.国家=b.国家 WHERE a.性别="1" AND b.性别<>"1"
或
SELECT a.国家,a.人口 as 女,b.人口 as 男 from ccc a JOIN ccc b ON a.国家=b.国家 WHERE alltrim(a.性别)=="1" AND alltrim(b.性别)=="2"
SELECT a.国家,a.人口 as 女,b.人口 as 男 from ccc a JOIN ccc b ON a.国家=b.国家 WHERE a.性别="1" AND b.性别<>"1"
或
SELECT a.国家,a.人口 as 女,b.人口 as 男 from ccc a JOIN ccc b ON a.国家=b.国家 WHERE alltrim(a.性别)=="1" AND alltrim(b.性别)=="2"