Friday, October 22, 2010

Database Lab


Lab: Databases

Name:


1. (60)
Go to SQLzoo.net and under the tutorial section find tutorial 1 (SELECT: In which we query the BBC country profile table). Do all six exercises. List the SQL query below with a screen shot of the results. The first query has already been done for you.
1a
SELECT name, region, population
FROM bbc
(add screen shot here)

2a
2b
2c
2d
2e
2. (40)
Using the bbc table on SQLzoo.net, perform the queries listed below. Be sure again to copy your SQL  below and add a screen shot of the results for each query.
2a. List region and the sum of the population in that region, sorted from largest sum to smallest sum.
2b. What are the top countries by GDP?
2c. What is the total population of ('France','Germany','Spain')?
2d. List country and population for countries in Europe with populations less than 100,000.