SQLZOO-SELECT names

sqlzoo练习答案 本文是小编在自学SQL过程中,做完SQLZOO Tutorial练习后整理的答案,仅供参考。 目录 select basics select from world select from nobel select in select sum and count join more join using null self join select basics 1. The example uses a WHERE clause to show t... 阅读详情
namecontinent
Afghanistan

Asia

AlbaniaEurope
AlgeriaAfrica
AndorraEurope
AngolaAfrica
...... 

1.Show the name and the population for 'Sweden', 'Norway' and 'Denmark'.

SELECT name, population FROM world
  WHERE name IN ( 'Sweden', 'Norway' ,'Denmark');

2.Find the country that start with Y

SELECT name FROM world
  WHERE name LIKE 'Y%'

3.Find the countries that end with y

SELECT name FROM world
  WHERE name LIKE '%y'

4.Find the countries that contain the letter x

SELECT name FROM world
  WHERE name LIKE '%x%'

5.Find the countries that end with land

SELECT name FROM world
  WHERE name LIKE '%land'

6.Find the countries that start with C and end with ia

SELECT name FROM world
  WHERE name LIKE 'c%ia'

7.Find the country that has oo in the name

SELECT name FROM world
  WHERE name LIKE '%oo%'

8.Find the countries that have three or more a in the name

SELECT name FROM world
  WHERE name LIKE '%a%a%a%'

9.Find the countries that have "t" as the second character.

SELECT name FROM world
 WHERE name LIKE '_t%'
ORDER BY name

10.Find the countries that have two "o" characters separated by two others

SELECT name FROM world
 WHERE name LIKE '%o__o%'

11.Find the countries that have exactly four characters.

SELECT name FROM world
 WHERE length(name)=4

12.Find the country where the name is the capital city.

SELECT name
  FROM world
 WHERE name = capital

13.Find the country where the capital is the country plus "City"

SELECT name
  FROM world
 WHERE capital = concat(name,' City');

14.Find the capital and the name where the capital includes the name of the country.

select capital, name from world where capital like concat('%',name,'%')

15.Find the capital and the name where the capital is an extension of name of the country.

You should include Mexico City as it is longer than Mexico. You should not include Luxembourg as the capital is the same as the country.

select capital, name from world where capital like concat(name,'_%') and name != capital;

16.Show the name and the extension where the capital is an extension of name of the country.

For Monaco-Ville the name is Monaco and the extension is -Ville.

select name,replace(capital,name,'') as ext from world where capital like concat(name,'_%');
28、SQLZOO 练习答案 SELECT names SQLZOO 练习答案 SELECT names篇 www.sqlzoo.net 此教程使用LIKE運算子來檢查國家名字,我們會在world表格中運用SELECT語句: name:國家名稱 continent:洲份 1、找出以 Y 為開首的國家。(%是萬用字元,可以用代表任何字。) select name from world where name like 'Y%' 2.找出以 Y 為結尾的... 阅读详情

相关推荐

SQLZOO 练习答案 SELECT_basic_names

www.sqlzoo.net 这网站不错,值得收藏 Basic篇 name continent area population gdp Afghanistan Asia 652230 25500100 20343000000 Albania Europe 28748 2831741 1296000

bestallen的博客 4576

SQLZOO练习-Part 1: SELECT basics

Part1:SELECT basics 1. Show the population of Germany. SELECT population FROM world WHERE name = 'Germany' 2.Show thenameand thepopulationfor 'Sweden', 'Norway' and 'Denmark'. SELECT name, population FROM world WHERE name IN ('Sweden...

fuli0120的博客 213

SQLzoo练习题1 SELECT names/zh

1.SELECT names/zh 1.你可以用WHERE name LIKE 'B%'來找出以 B 為開首的國家。%是萬用字元,可以用代表任何字元。 找出以 Y 為開首的國家。 SELECT name FROM world WHERE name LIKE 'Y%' 2.找出以 Y 為結尾的國家。 SELECT name FROM world WHERE name LIKE '%Y' 3....

WANG_Qing_qiu的博客 698

sqlzoo刷题(部分题目含解题思路)

1.concat函数用法 (1)12、The capital of Mexico is Mexico City. Show all the countries where the capital has the country together with the word "City". Find the country where the capital is the country plus "City". 查找首都是国家名字加上”城市”的国家。 SELECT name FROM world

weixin_46326251的博客 1189

避坑指南:中国地面气候日值数据集(V3.0)处理中的常见错误与解决方案

本文详细解析了中国地面气候日值数据集(V3.0)处理中的常见错误与解决方案,包括数据清洗、特征值解码、时间序列处理和质量控制等关键步骤。通过Python实战代码示例,帮助研究者高效处理这一包含全国699个气象站多要素日值数据的数据集,避免常见陷阱,提升气候变化研究和农业气象分析的准确性。

xray4的博客 1026

已过tiktok校招客户端,面经分享

面试的话, 一天面完3面, 效率很高, 三天之后就发了offer 字节邮件里面也说了不能泄露面试题, 那我就把我秋招参与美团,字节,腾讯,阿里面试被问到的全部问题总结着写出来了, 这其实是我每一轮面试完之后我都会总结哪里答对了, 哪里没有答对, 总结了一大堆问题出来. 答案未必正确, 我只是给自己写了个简单的一句话概括, 可能不够完善, 建议看官自行回答一下这些问题 二本非科班, 暑假在字节实习过, 不过不是tiktok部门, 因此秋招就没啥时间准备面试了, 只投了几个大厂, 顺便也在字节跨部门转正,

a1472750149的博客 1307

【vue运行报错】There are multiple modules with names... 报错原因和解决办法

There are multiple modules with names that only differ in casing.

我有满天星辰的博客 5832

U8备份提示“远程组件初始化失败”

问题现象: SQL出现问题后重装,U8没有重装,之后直接附加数据库,U8可以正常登陆,但是在备份的时候提示远程组件初始化失败。 问题原因: 因为重装了SQL,没有进行U8数据源初始化,导致Master库中丢失了存储过程储 解决办法:在Master库重建存储过程 USE [master] GO SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[U8FileServerExtendProc] @cmdLi.

SamYux 2472

sqlzoo答案汇总

文章目录0 SELECT basics1、Modify it to show the population of Germany2、Show the name and the population for 'Sweden', 'Norway' and 'Denmark'.3、(重要:between用法)Modify it to show the country and the area for countries with an area between 200,000 and 250,000.1 SELE

weixin_38743272的博客 2053

SAP ABAP MIGO增强实战:自定义页签与字段的完整实现指南

本文详细介绍了SAP ABAP中MIGO增强的实战指南,包括自定义页签与字段的完整实现步骤。通过BADI增强技术,开发者可以快速满足企业个性化需求,如添加供应商批次号等特殊字段。文章涵盖数据存储结构设计、BADI框架实现、核心方法编写及数据持久化方案,帮助用户高效完成MIGO屏幕增强开发。

study的专栏 774

8155平台multi-display(多屏显示)原理与配置

8155平台多屏互动原理与配置

漂流瓶の海岸 1606

【SQLZOO】 SELECT names练习题解

【SQLZOO】 SELECT names练习题解 练习链接:https://sqlzoo.net/wiki/SELECT_names 模糊查找 LIKE 练习 1.You can use WHERE name LIKE ‘B%’ to find the countries that start with “B”. The % is a wild-card it can match any cha...

weixin_42796244的博客 604

2月底速申!国家超算互联网免费算力全攻略|编程小白零消耗实操首测_2026-02-26

2月底速申!国家超算互联网免费算力全攻略|编程小白零消耗实操首测作为一名编程小白,我目前正在学习编译和运行 Qt 框架,也在逐步摸索开发环境的配置方法,目标是打造一款属于自己的个人效率工具。就在这时,我挖到了一个国家级硬核福利:国家超算互联网核心节点开放免费试运行!哪怕是零基础如我,也能申领到 100 卡时异构加速卡算力,关键是——2 月底前申请更稳妥,早占位早使用。

qq_58517981的博客 2098

sqlzoo答案1-SELECT names

【代码】sqlzoo答案-SELECT names。

weixin_63983205的博客 1801

2026年软件测试职业院校技能大赛—ERP管理平台-采购入库模块Bug定位与查找

竞赛对接软件测试相关标准,以“ERP管理平台” 为被测系统,围绕软件测试领域的主流技术及工具,考查选手面 对实际问题的综合分析能力,对测试文档、测试用例的设计能力, 对单元测试、自动化测试、性能测试、接口测试等测试工具及方 法的掌握程度,检验选手团队协作能力、组织规划能力、方法运用能力等。

我是网络安全兼技能大赛工程师,专注网络安全技术学习与技能大赛实战!持续分享最新的技术文章,帮你少走弯路,一起在技术赛道上进步~ 194

【图论】系列(一)之图论的构成

图论是研究图的数学分支,本章介绍了图论的基本构成和概念

qq_30066733的博客 748

【SQL】sqlzoo练习题SELECT names

原地址:https://sqlzoo.net/wiki/SELECT_names/zh 上一篇:【SQL】练习题SELECT basics 1.你可以用WHERE name LIKE 'B%'來找出以 B 為開首的國家。 %是萬用字元,可以用代表任何字完。 找出以 Y 為開首的國家。 select name from world where name like 'Y%' 2.找出以 Y 為結...

weixin_44576578的博客 1218

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

SQLZOO——1 SELECT names

sql

263

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

sqlzoo-select names

1. select names 文字样式匹配 找出以 Y 為開首的國家。 select name from world where name like 'Y%'; 找出以 Y 為結尾的國家。 select name from world where name like '%Y' 找出所有國家,其名字包括字母x。 select name from world where name ...

不期而遇、的博客 418

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

初入数据分析,SQLZoo语法练习【SELECT names/zh】

14、找出所有首都和其国家名字,而首都是国家名字的眼神。9、找出所有国家,其名字都有两个字母"o",被另外两个字母相隔着.12、显示所有国家名字,其首都是国家名字加上“city”.13、找出所有首都和其国家名字,而首都要有国家名字中出现.15、显示国家名字,及其延伸词,如首都是国家名字的延伸.11、显示所有国家名字,其首都和国家名字是相同的.7、找出所有国家,其名字包括三个或以上的"a".4、找出所有国家,其名字以"land"作结尾.8、找出所有国家,其名字以"t"作第二个字母.

weixin_45409116的博客 89

SELECT names - SQLZOO

【代码】SELECT names - SQLZOO

qq_65168354的博客 140

SQLZOO练习答案(一):SELECT names/zh

namecontinentAfghanistanAsiaAlbaniaEuropeAlgeriaAfricaAndorraEuropeAngolaAfrica....name:國家名稱continent:洲份1、你可以用WHERE name LIKE 'B%'來找出以 B 為開首的國家。%是萬用字元,可以用代表任何字完。找出以 Y 為開首的國家。SELECT name FROM world  WH...

易義的博客 9193

1 SELECT names-SQLZoo

Pattern Matching Strings This tutorial uses the LIKE operator to check names. We will be using the SELECT command on the table world: You can use WHERE name LIKE ‘B%’ to find the countries that star...

Tracy785的博客 301

sqlzoo整理——SELECT names/zh

最近在练习sql,整理了sqlzoo中的答案,特此记录。 SELECT_names/zh 1.找出以 Y 為開首的國家。 SELECT name FROM WORLD WHERE name LIKE 'Y%'; 2.找出以 Y 為結尾的國家。 SELECT name FROM WORLD WHERE name LIKE '%Y'; 3.找出所有國家,其名字包括字母x。 SELECT name FROM WORLD WHERE name LIKE '%x%'; 4.找出所有國家,其名字以

weixin_44056331的博客 409

SQLZOO习题及答案--SELECT names/zh

SQLZOO:http://zh.sqlzoo.net/wiki/SELECT_names/zh 1.找出以 Y 為開首的國家。 SELECT name FROM world WHERE name LIKE 'Y% 2.找出以 Y 為結尾的國家 SELECT name FROM world WHERE name LIKE '%Y' 3. “Luxembourg...

meowing的博客 859

sqlzoo刷题笔记-05 | SELECT names

网址:https://sqlzoo.net/wiki/SELECT_names 1、You can useWHERE name LIKE 'B%'to find the countries that start with "B". The% is awild-cardit can match any characters Find the country that start with Y 查找以 Y 开始的国家/地区。 SELECT name FROM world WHE...

weixin_45730948的博客 416
上一篇: turtle库绘制蟒蛇--python
下一篇: ubuntu断电后开机出现循环登陆问题,分辨率800*600
Netooo
博客等级 码龄10年 13粉丝 28原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值