SELECT query on joined tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Deven Oza
    New Member
    • Oct 2006
    • 53

    SELECT query on joined tables

    Here are two sample tables of information which are used by a high school to keep track of the grades for its students. One table contains the names and addresses of the students, together with a student ID number. The second table contains the class name and class ID number, together with the student ID number and the grade for that student for that class. If the student did not take the class, the class grade is left empty. To list the grades for all the courses taken by a student, you have to use Table 1 to get the name of the student and the Student ID, and then use the Student ID to look in Table 2 to find the classes for which this student has a grade.


    Two Sample Tables of Information


    1. Student Table
    Student ID
    Student Name
    Student Address Line 1
    Student Address Line 2
    Student Zip Code

    2. Class Table
    Class ID
    Class Name
    Student ID
    Class Grade
    Semester (Fall, Spring)
    Teacher
    Year


    List the students by name and their grades for all classes taken in the Fall semester of last year.


    Which lines of the tables are needed to get the information for the business report?


    Thank you
    DB
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    You have posted this in the Articles Section. I am moving it to the Oracles forum.

    ADMIN

    Comment

    Working...