自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 SQLZOO_9 SELF JOIN

1.How many stops are in the database. select count(*) from stops; 2.Find the id value for the stop ‘Craiglockhart’ select id from stops where name='Craiglockhart'; 3.Give the id and the name for the stops on the ‘4’ ‘LRT’ service. select id,name from sto

2020-09-21 17:43:18 185

原创 SQLZOO_8 USING NULL

1.List the teachers who have NULL for their department. select name from teacher where dept is null; 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

2020-09-21 17:41:03 154

原创 SQLZOO_7 MORE JOIN

1.List the films where the yr is 1962 [Show id, title] SELECT id, title FROM movie WHERE yr=1962 2.Give year of ‘Citizen Kane’. select yr from movie where title='Citizen Kane' 3.List all of the Star Trek movies, include the id, title and yr (all of the

2020-09-21 17:39:17 146

原创 SQLZOO_6 JOIN

1.The first example shows the goal scored by a player with the last name ‘Bender’. The * says to list all the columns in the table - a shorter way of saying matchid, teamid, player, gtime Modify it to show the matchid and player name for all goals scored b

2020-09-21 17:36:35 204 1

原创 SQLZOO_5 SUM and COUNT

1.Show the total population of the world. world(name, continent, area, population, gdp) SELECT SUM(population) FROM world 2.List all the continents - just once each. select distinct continent from world 3.Give the total GDP of Africa select sum(gdp) from

2020-09-21 17:32:27 141

原创 SQLZOO_4 SELECT within SELECT

1.List each country name where the population is larger than that of ‘Russia’. world(name, continent, area, population, gdp) select name from world where population>(select population from world where name='Russia') 2.Show the countries in Europe with

2020-09-21 17:26:23 187

原创 SQLZOO_3 SELECT from Nobel

1. Change the query shown so that it displays Nobel prizes for 1950. SELECT yr, subject, winner FROM nobel WHERE yr = 1950 2. Show who won the 1962 prize for Literature. SELECT winner FROM nobel WHERE yr = 1962 AND subject = ‘Literature’ 3. Show the year a

2020-09-21 17:17:28 285

原创 SQLZOO_2 SELECT from WORLD

1.Read the notes about this table. Observe the result of running this SQL command to show the name, continent and population of all countries. SELECT name, continent, population FROM world 2.How to use WHERE to filter records. Show the name for the countr

2020-09-21 17:12:40 247

原创 SQLZOO_1 SELECT basic

1.The example uses a WHERE clause to show the population of ‘France’. Note that strings (pieces of text that are data) should be in ‘single quotes’; Modify it to show the population of Germany SELECT population FROM world WHERE name = 'Germany' 2.Checki

2020-09-21 17:03:42 117

原创 某房地产平台数据运营SQL测试题目

某房地产平台的SQL测试题目 题目:导出昨日需要发放线上成交奖励的订单及明细; 表格名称:rpt_shh_deal_agreemment_base_da 规则: 1.当月截止昨天二手线上成交单量占比(含车位)>=50%的门店可获奖; 2.符合获奖条件的门店shop_code的第1单线上成交可获得200贝壳币,第2单可获400贝壳币,第3单及以上可获800贝壳币,但车库不奖励; 3.stat_function_name字段:“车位”、“车库”认为是车库; 4.线上成交占比=线上成交单量/总成交单量; 5

2020-09-19 23:46:59 455 1

原创 Python 用while()判断并输出1000以内(或10000以内)的水仙花数

什么是水仙花数:水仙花数是指一个 n 位数(n≥3 ),它的每个位上的数字的 n 次幂之和等于它本身(例如:1**3 + 5**3 + 3**3 = 153) 思路解析 判断这个数的位数是否是3位以上。(如果是1000以内的数字,问题比较简单,可以直接判断是否≥100;如果要判断的数还包括4位的,那还需要判断数字的位数,可以考虑用循环来做) 判断这个数各个位上的数字。(我认为这个是这个题的核心点) 各位上的数字的n次幂的和的计算。(循环) 第3点计算的值是否和该数字相等。(条件判断) 具体解析

2020-08-29 17:47:47 5115

空空如也

空空如也

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

TA关注的人

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