博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SqlZoo.net习题答案:Using the SELECT statement.【bbc】
阅读量:4627 次
发布时间:2019-06-09

本文共 942 字,大约阅读时间需要 3 分钟。

习题地址:

 

表结构:bbc(name, region, area, population, gdp)

 

2a.Show the name for the countries that have a population of at least 200 million. (200 million is 200000000, there are eight zeros)

select name from bbc where population >= 200000000

 

2b.Give the name and the per capita GDP for those countries with a population of at least 200 million.

select name, GDP/populationfrom bbcwhere population >= 200000000

 

2c.Show the name and population in millions for the countries of 'Middle East'

Divide the population by 1000000 to get population in millions.

select name, population/1000000from bbcwhere region = 'Middle East'

 

2d.Show the name and population for 'France', 'Germany', 'Italy'

select name, populationfrom bbcwhere name in ('France', 'Germany', 'Italy')

 

2e.Identify the countries which have names including the word 'United'

select namefrom bbcwhere name like '%United%'

转载于:https://www.cnblogs.com/Leo-Forest/archive/2012/06/01/2531029.html

你可能感兴趣的文章
面向对象的3大特性
查看>>
Express4.x API (四):Router (译)
查看>>
device.cpp
查看>>
django学习笔记--数据库中的多表操作
查看>>
LESS 的 operation 是 特性
查看>>
[VBScript] 自动删除2小时以前生成的文件
查看>>
通过BeanShell获取UUID并将参数传递给Jmeter
查看>>
[03] 处理注解:反射
查看>>
示例-添加删除附件
查看>>
textarea输入框限制字数(JS)
查看>>
2.1 mac下多版本jdk的安装和管理
查看>>
调手表
查看>>
Wannafly挑战赛14
查看>>
开发微信小程序入门前
查看>>
Word英文字符间距太大 中英文输入切换都不行
查看>>
java后端判断用户是否关注公众号
查看>>
判断JS对象是否拥有某属性两种方式
查看>>
自定义异常
查看>>
黑马程序员___Java基础[02-Java基础语法](一)
查看>>
USACO09FEB Fair Shuttle
查看>>