DATA 225 Database Systems for Analytics (Instructor: Ron Mak)
Introduction to SQL Queries  
Database tables
student
id last first contact_id
S1001 Doe John C03
S1005 Nova Tim C04
S1009 Klein Leslie C05
S1014 Jane Mary C01
S1021 Smith Kim C02
teacher
id last first contact_id
T7003 Rogers Pat C06
T7008 Thompson Sidney C07
T7012 Lane John C08
T7051 Flynn Mabel C09
contact
id email
C01 mary.jane@state.edu
C02 kim.smith@state.edu
C03 john.doe@state.edu
C04 tim.novak@state.edu
C05 leslie.klein@state.edu
C06 pat.rogers@state.edu
C07 sidneythompson@state.edu
C08 john.lane@state.edu
C09 mabel.flynn@state.edu
Queries
Who are the students?
Who are the teachers?
What is the email address of student ?
What is the email address of teacher ?
Which student has email address ?
Which teacher has email address ?
Query result
Result table to appear here.