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
class
code subject room teacher_id
DATA 200 Python Programming 101 T7051
DATA 220 Mathematical Models 114 T7008
DATA 225 Database Systems 101 T7003
DATA 240 Data Mining 120 T7012
DATA 245 Machine Learning 115 T7051
Queries
What are the classes?
What is the class code of ?
Which classes meet in room ?
Who teaches in room ?
Who is teaching ?
What subjects does teach?
In which classrooms does teach?
Query result
Result table to appear here.