Lab Assignment #2 (due April 13th, 2011)
Don’t forget to bring a written (printed)
copy of your work
(i.e. SQL queries and their results for
the following 6 questions) to the lab.
Your work should contain the SQL
statement as well as the outputs.
Write and run MySQL queries for the following
questions. Also provide the query results.
If a query results in more than 10 rows (tuples)
give only the first five and last five rows.
In each case, indicate the number of rows the
query returns.
1. Find those Africa cities
with a population of more than 2 Million.
2. Find the number of
distinct langues in CountryLanguage table.
3. Find those cities that
are unique (the only city) in their districts.
4. Find the languages spoken
in Europe.
5. Find those Middle East
countries with a LifeExpectancy longer than the average LifeExpectancy of the
European Countries.
6. Find those countries
where official language is english and population is greater than 10 Million.
During
the Lab hours:
1. You will be asked to turn in
your written answers for the above queries
2. You will be asked to write one
or two SQL queries (very similar to the above queries)
3. Your performance will be graded
for both step 1 (written work) and step 2 (query practice)..