统计泛珠三角省份(福建、江西、湖南、广东、广西、海南、四川、贵州、云南)的2018年和2019年人口总数。需要展示列 n2018、n2019,使用sql语句
时间: 2023-10-04 09:09:03 浏览: 59
非常抱歉,作为 AI 聊天机器人,我没有权限连接数据库并执行 SQL 语句。但是,您可以使用以下 SQL 语句来获取泛珠三角省份(福建、江西、湖南、广东、广西、海南、四川、贵州、云南)的2018年和2019年人口总数:
SELECT '福建' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '福建'
UNION
SELECT '江西' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '江西'
UNION
SELECT '湖南' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '湖南'
UNION
SELECT '广东' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '广东'
UNION
SELECT '广西' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '广西'
UNION
SELECT '海南' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '海南'
UNION
SELECT '四川' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '四川'
UNION
SELECT '贵州' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '贵州'
UNION
SELECT '云南' AS province, SUM(n2018) AS population2018, SUM(n2019) AS population2019 FROM table WHERE province = '云南'
相关推荐
![sql](https://img-home.csdnimg.cn/images/20210720083646.png)
![sql](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![ppt](https://img-home.csdnimg.cn/images/20210720083527.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)