595. Big Countries --- SQL related from leetcode
595. Big Countries
There is a table World
+-----------------+------------+------------+--------------+---------------+
| name | continent | area | population | gdp |
+-----------------+------------+------------+--------------+---------------+
| Afghanistan | Asia | 652230 | 25500100 | 20343000 |
| Albania | Europe | 28748 | 2831741 | 12960000 |
| Algeria | Africa | 2381741 | 37100000 | 188681000 |
| Andorra | Europe | 468 | 78115 | 3712000 |
| Angola | Africa | 1246700 | 20609294 | 100990000 |
+-----------------+------------+------------+--------------+---------------+
A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million.
Write a SQL solution to output big countries' name, population and area.
For example, according to the above table, we should output:
+--------------+-------------+--------------+
| name | population | area |
+--------------+-------------+--------------+
| Afghanistan | 25500100 | 652230 |
| Algeria | 37100000 | 2381741 |
+--------------+-------------+--------------+
Solution:
# Write your MySQL query statement below
select name,area,population from World where area >= 3000000 or population >= 25000000;
595. Big Countries --- SQL related from leetcode的更多相关文章
- LeetCode 595. Big Countries
There is a table World +-----------------+------------+------------+--------------+---------------+ ...
- LeetCode 595. Big Countries (大的国家)
题目标签: 题目给了我们一个 world table,让我们找出 面积大于3 million square km 或者 人口大于 25 million. 直接用两个条件搜索. Java Solutio ...
- 595. Big Countries
There is a table World +-----------------+------------+------------+--------------+---------------+ ...
- SQL Server实现 LeetCode 178 分数排名
178. 分数排名 SQL架构 编写一个 SQL 查询来实现分数排名.如果两个分数相同,则两个分数排名(Rank)相同.请注意,平分后的下一个名次应该是下一个连续的整数值.换句话说,名次之间不应该有& ...
- SQL Server实现 LeetCode 177 第N高的薪水
177. 第N高的薪水 编写一个 SQL 查询,获取 Employee 表中第 n 高的薪水(Salary). +----+--------+ | Id | Salary | +----+------ ...
- SQL Server实现 LeetCode 176 第二高的薪水
176. 第二高的薪水 SQL架构 编写一个 SQL 查询,获取 Employee 表中第二高的薪水(Salary) . +----+--------+ | Id | Salary | +----+- ...
- Leetcode中的SQL题目练习(一)
595. Big Countries https://leetcode.com/problems/big-countries/description/ Description name contine ...
- SQL练习——LeetCode解题和总结(1)
只用于个人的学习和总结. 178. Rank Scores 一.表信息 二.题目信息 对上表中的成绩由高到低排序,并列出排名.当两个人获得相同分数时,取并列名次,且名词中无断档. Write a SQ ...
- All LeetCode Questions List 题目汇总
All LeetCode Questions List(Part of Answers, still updating) 题目汇总及部分答案(持续更新中) Leetcode problems clas ...
随机推荐
- spark java.lang.OutOfMemoryError: unable to create new native thread
最近迁移集群,在hadoop-2.8.4 的yarn上跑 spark 程序 报了以下错误 java.lang.OutOfMemoryError: unable to create new native ...
- vue.js插值,插入图片,属性
<html><head><title>Insert title here</title><script type="text/javas ...
- 解决bootstrap和easyUI部分css类冲突问题。
今天发现bootstrap和easyui的css类重复用了一个很笨的办法解决了,这种小事网上都不好搜啊. 我先引用的bootstrap后引用的easy UI,bootstrap的会被覆盖,boot的样 ...
- Beta冲刺——第三天
beta冲刺:第三天 各个成员今日完成的任务 成员 冯晓.马思远 彭辉.王爽 吴琼.郝延婷 今日完成任务 ·管理员管理功能模块下角色管理功能的完善测试 ·角色和权限部分代码规范 ·博客撰写 ·后台系统 ...
- BuildTool
(一)BuildTool是什么 BuildTool 构建工具 ,是一个把源代码生成可执行应用程序的过程自动化的程序(例如Android app生成apk).构建包括编译.连接跟把代码打包成可用的或可 ...
- 《CSAPP》符号解析
符号解析 链接器解析符号引用的方法是将每个引用与它输入的可重定位目标文件的符号表中的一个确定的符号定义联系起来.编译器只允许每个模块中每个本地符号只有一个定义. 对于全局符号,当编译器遇到一个不是在当 ...
- Linux - 操作系统
操作系统(科普章节) 目标 了解操作系统及作用 1. 操作系统(Operation System,OS) 操作系统作为接口的示意图 没有安装操作系统的计算机,通常被称为 裸机 如果想在 裸机 上运行自 ...
- Linux云服务器
1. 第一步:前往阿里云官网注册账号,实名认证.进去云服务器,创建实例! 第二步:选配置,**公网IP地址选择“分配”!**如果你是首次购买主机,安全组先不必勾选,或者勾选默认的 .后面,会有安全组的 ...
- Extension-valuepart
data: ls_extension type bapiparex. loop at extensionin into ls_extension . read table extensionout i ...
- [leetcode]244. Shortest Word Distance II最短单词距离(允许连环call)
Design a class which receives a list of words in the constructor, and implements a method that takes ...