题目
答案
-
select city , population from north_american_cities where country like ‘%canada%’; 或者 SELECT city, population FROM north_american_cities WHERE country = “Canada”;
-
select city, latitude from North_american_cities where country = “United States” order by latitude desc;
-
select city ,longitude from north_american_cities where longitude < -87.629798 order by longitude;
-
select city,population from North_american_cities
where country = “Mexico”
order by population desc
limit 2; -
select city,population from North_american_cities
where country = “United States”
order by population desc
limit 2,2;country like ‘%canada%’ ,注意此处为单括号
country = “Canada”,注意此处为双括号
以上内容来自我在下面网上学习所做的笔记
https://sqlbolt.com/lesson/select_queries_with_joins
http://xuesql.cn/lesson/select_queries_with_joins