SQL
izheng000
这个作者很懒,什么都没留下…
展开
-
SQLZOO(More JOIN operations)Writeup
1.SELECT id, title FROM movie WHERE yr=19622.select yr from movie where title='Citizen Kane'3.select id,title,yr from movie where title like '%Star Trek%' order by yr4.select title from movie where i原创 2016-04-26 13:42:42 · 428 阅读 · 0 评论 -
SQLZOO(SELECT from WORLD Tutorial)Writeup
1.SELECT name, continent, population FROM world2.SELECT name FROM world WHERE population>2000000003.select name,gdp/population from world where population >=2000000004.SELECT name, population/1000000原创 2016-04-25 09:47:39 · 1465 阅读 · 1 评论 -
SQLZOO(select basics)writeup
转载自SQLZOO(select basics)writeup1.SELECT population FROM world WHERE name = 'Germany'2.SELECT name,gdp/population FROM world WHERE area > 50000003.SELECT name, population FROM world WHERE name IN原创 2016-04-24 23:21:29 · 505 阅读 · 0 评论 -
SQLZOO(SELECT from Nobel Tutorial)Writeup
转载自SQLZOO(SELECT from Nobel Tutorial)Writeup1.SELECT yr, subject, winner FROM nobel WHERE yr = 19502.SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature'3.select yr,subject from原创 2016-04-25 10:18:03 · 504 阅读 · 0 评论 -
SQLZOO(SELECT within SELECT Tutorial)Writeup
转载自SQLZOO(SELECT within SELECT Tutorial)Writeup1.SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name='Russia')2.SELECT name FROM world WHERE continent =原创 2016-04-25 11:06:54 · 670 阅读 · 0 评论 -
SQLZOO(SUM and COUNT)Writeup
转载自SQLZOO(SUM and COUNT)Writeup1.SELECT SUM(population) FROM world2.select DISTINCT(continent) from world3.select sum(gdp) from world where continent ='Africa'4.select count(name) from world where area原创 2016-04-25 20:38:24 · 296 阅读 · 0 评论 -
SQLZOO(The JOIN operation)Writeup
转载自SQLZOO(The JOIN operation)Writeup1.SELECT matchid,player FROM goal WHERE teamid = 'GER'2.SELECT id,stadium,team1,team2 FROM game where id=10123.SELECT player,teamid,stadium,mdate FROM game JOI原创 2016-04-25 21:11:40 · 433 阅读 · 0 评论 -
SQLZOO(Using Null)Writeup
转载自SQLZOO(Using Null)Writeup1.select name from teacher where dept is null2.SELECT teacher.name, dept.name FROM teacher INNER JOIN dept ON (teacher.dept=dept.id)3.SELECT teacher.name, dept.原创 2016-04-26 14:07:55 · 507 阅读 · 0 评论 -
SQLZOO(self join)writeup未完
转载自SQLZOO(self join)writeup未完1select count(id) from stops2select id from stops where name='Craiglockhart'3.select id,name from stops join route on stops.id=route.stop where route.num=4 and route.compan原创 2016-05-02 19:36:30 · 315 阅读 · 0 评论