[Main Page]      [Literature]      [Software]      [People]      [Conferences]      [Courses]      [Web-DB]

 

UNIVERSITY OF PITTSBURGH
School of Information Sciences

INFSCI 2710 - Database Management

(Spring 2000, CRN 20727)


Homework Assignment #8:    SQL


Reading Assignment

Please read the following chapter from the book by Elmasri and Navathe (3rd Edition):

Exercise 8 (10 Points)

Your results for homeworks, midterm and final exam are stored in a relational database with the following schema:

An SQL*Plus script which generates these tables and fills them with some sample data (of course, not the real data) is available from

Please write the following queries in SQL. You are strongly advised to really test them in SQL*Plus (or some other SQL system). In SQL*Plus, you can create a spool file and submit this (see Appendix B). You do not need to submit the query results.

    a)
Print the first and last name of all students who have got the maximal points for Exercise 2 in the midterm exam. "Maximal points" is the number stored in EXERCISES, not the maximum which was actually reached (so it is possible that the output is empty). You must write one query for this exercise. It is not allowed first to look up the maximal points and then put this value into the query.
    b)
What is the average percentage reached for Homework 2?
    c)
How many students have done any homework?
    d)
Print for every student (first name, last name) the total number of points he/she got for the midterm exam.
    e)
Print for all students who have solved Homework 1-5 the total number of points for these homeworks. It might be that the database contains already a results for other homeworks (e.g. Homework 6).

Due Date:

Please submit your solution on next Wednesday (March 29) before the lecture. You may submit Part e) one week later.


Stefan Brass (sbrass@sis.pitt.edu), March 22, 2000

Original URL: http://www2.sis.pitt.edu/~sbrass/db00_2/h8_sql.html   [HTML 3.2 Checked]