MoL Chapter 2

Revision as of 15:35, 15 November 2015 by Andr3w (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


From chapter 2

Show all the data in the table world
Show the continent and name
SELECT continent, name FROM world
Show the details of France
SELECT name, population, capital, continent
  FROM world
 WHERE name='France'
Show the Countries of North America
SELECT name, continent
  FROM world
 WHERE continent='North America'
Which country has an area of 103000?
SELECT name, continent
  FROM world
 WHERE area=103000

Try It Now

What country has Beijing as the capital?
  FROM world
 WHERE capital='Beijing'
What is the capital of United Kingdom
SELECT capital
  FROM world
 WHERE name='United Kingdom'
What countries take the name of their capital city?
SELECT name, capital
  FROM world
 WHERE name=capital
Show the countries with more than 200 million
SELECT name, population
  FROM world
 WHERE population>200000000
Show the countries after Y in the alphabet
SELECT name, continent
  FROM world
 WHERE name>'Y'