自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 sqlzoo第九部分错题及答案

stops(id, name)route(num, company, pos, stop)3.Give the id and the name for the stops on the ‘4’ ‘LRT’ serviceselect id,name from stops join route on route.stop=stops.idwhere num=4 and company='LRT'#有错误,但我自己找不到,想哭#8.Give a list of the services which

2020-07-30 23:31:10 479

原创 sqlzoo第八部分错题及答案

2.Note the INNER JOIN misses the teachers with no department and the departments with no teacher.SELECT teacher.name, dept.name FROM teacher INNER JOIN dept ON (teacher.dept=dept.id)3.Use a different JOIN so that all teachers are listed.SEL

2020-07-30 21:06:06 480

原创 sqlzoo第七部分错题及答案

電影數據庫此教程練習表格合拼。數據庫有三個表格movie電影(id編號, title電影名稱, yr首影年份, director導演, budget製作費, gross票房收入)actor演員(id編號, name姓名)casting角色(movieid電影編號, actorid演員編號, ord角色次序)12.尊·特拉華達’John Travolta’最忙是哪一年? 顯示年份和該年的電影數目。SELECT yr,COUNT(title) FROM movie JOIN casting ON

2020-07-30 13:48:39 1012

原创 sqlzoo第五六部分错题及答案

8.列出有至少100百萬(1億)(100,000,000)人口的洲份。select continent from world group by continenthaving sum(population)>=100000000HAVING 子句对 GROUP BY 子句设置条件的方式与 WHERE 和 SELECT 的交互方式类似。WHERE 搜索条件在进行分组操作之前应用;而 HAVING 搜索条件在进行分组操作之后应用。HAVING 语法与 WHERE 语法类似,但 HAVING 可以

2020-07-28 20:44:49 1063 1

原创 sqlzoo第四部分错题及答案

5.Germany德國(人口8000萬),在Europe歐洲國家的人口最多。Austria奧地利(人口850萬)擁有德國總人口的11%。顯示歐洲的國家名稱name和每個國家的人口population。以德國的人口的百分比作人口顯示。小數位數您可以使用函數ROUND 刪除小數。百分號 %select name,concat(ROUND(population/( select population from world where name='Germany')*100,

2020-07-26 23:01:45 1312 2

原创 sqlzoo第三部分错题及答案

查找尤金•奧尼爾EUGENE O’NEILL得獎的所有細節select * from nobelwhere winner='EUGENE O''NEILL'#字符有单引号,多打一个引号转义列出爵士的獲獎者、年份、獎頁(爵士的名字以Sir開始)。先顯示最新獲獎者,然後同年再按名稱順序排列。select winner,yr,subject from nobelwhere winner like 'Sir%'order by yr desc,winner#双层排序注意逗号14.Th...

2020-07-24 22:27:10 1890

原创 sqlzoo第二部分错题及答案

11.The CASE statement shown is used to substitute North America for Caribbean in the third column.Show the name - but substitute Australasia for Oceania - for countries beginning with N.SELECT name, CASE WHEN continent='Oceania' THEN 'Australasia'

2020-07-24 20:32:39 671

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除