472,135 Members | 1,248 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,135 software developers and data experts.

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
May 7 '07 #1
1 932
MMcCarthy
14,534 Expert Mod 8TB
You have posted this in the Articles Section. I am moving it to the Oracles forum.

ADMIN
May 7 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by allyn44 | last post: by
1 post views Thread by Carl B Davis | last post: by
14 posts views Thread by Tom | last post: by
2 posts views Thread by Fendi Baba | last post: by
1 post views Thread by racquetballer | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.