5 SUM and COUNT Quiz-SQLZoo

在这里插入图片描述
1. Select the statement that shows the sum of population of all countries in 'Europe’

SELECT SUM(population) FROM bbc WHERE region = 'Europe'

2. Select the statement that shows the number of countries with population smaller than 150000

SELECT COUNT(name) FROM bbc WHERE population < 150000

3. Select the list of core SQL aggregate functions

AVG(), COUNT(), MAX(), MIN(), SUM()

4. Select the result that would be obtained from the following code:

 SELECT region, SUM(area)
   FROM bbc 
  WHERE SUM(area) > 15000000 
  GROUP BY region

No result due to invalid use of the WHERE function

5. Select the statement that shows the average population of ‘Poland’, ‘Germany’ and 'Denmark’

 SELECT AVG(population) FROM bbc WHERE name IN ('Poland', 'Germany', 'Denmark')

6. Select the statement that shows the medium population density of each region

 SELECT region, SUM(population)/SUM(area) AS density FROM bbc GROUP BY region

7. Select the statement that shows the name and population density of the country with the largest population

 SELECT name, population/area AS density FROM bbc WHERE population = (SELECT MAX(population) FROM bbc)

8. Pick the result that would be obtained from the following code:

 SELECT region, SUM(area) 
   FROM bbc 
  GROUP BY region 
  HAVING SUM(area)<= 20000000

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
no main manifest attribute, in quiz-0.0.1-SNAPSHOT.jar 是一个报错信息,表示在quiz-0.0.1-SNAPSHOT.jar包的清单文件(MANIFEST.MF)中缺少了主清单属性。 解决这个问题的方法是在pom文件中添加以下配置: ``` <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> ``` 这个配置会在打包过程中自动生成并添加主清单属性,确保jar包能够正确运行。 同时,需要确保MANIFEST.MF文件夹和MANIFEST.MF文件位于项目的根目录下,才能够在本地使用java -jar命令运行jar包或在Docker容器中启动。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [no main manifest attribute, in app-1.0-SNAPSHOT.jar](https://blog.csdn.net/YonJarLuo/article/details/128530264)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [no main manifest attribute, in schoolspringboot-0.0.1-SNAPSHOT.jar](https://blog.csdn.net/weixin_52236586/article/details/131679246)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [start-0.0.1-SNAPSHOT.jar](https://download.csdn.net/download/qq_38807606/12268407)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值