sql
JungleWalker
这个作者很懒,什么都没留下…
展开
-
sqlzoo:The JOIN operation
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-12-09 16:06:48 · 207 阅读 · 1 评论 -
sqlzoo:SUM and COUNT
Show the total population of the world. SELECT SUM(population) FROM world List all the continents - just once each. SELECT continent FROM world GROUP BY continent SELECT DISTINCT continent FROM world Give the total GDP of Africa SELECT SUM..原创 2020-12-07 11:56:47 · 183 阅读 · 0 评论 -
sqlzoo:SELECT within SELECT Tutorial
List each country name where the population is larger than that of ‘Russia’. SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name='Russia') Show the countries in Europe with a per capita GDP greater than ‘United ..原创 2020-11-26 16:35:08 · 184 阅读 · 0 评论 -
sqlzoo:SELECT from Nobel Tutorial
Change the query shown so that it displays Nobel prizes for 1950. SELECT yr, subject, winner FROM nobel WHERE yr = 1950 Show who won the 1962 prize for Literature. SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature' Show the..原创 2020-11-18 14:36:26 · 117 阅读 · 0 评论 -
sqlzoo:SELECT from WORLD Tutorial
show the name, continent and population of all countries. SELECT name, continent, population FROM world Show the name for the countries that have a population of at least 200 million. SELECT name FROM world WHERE population>200000000 Give ..原创 2020-11-11 19:44:55 · 186 阅读 · 0 评论