Untitled

We will work up to the primary table we want. Lets start with something a little bit less complex first. When working on these, keep in mind there are many ways to write equivalent SELECT statements, so your solution may be different from the one given.

Names and Email Table

See if you can re-create the following table with a SELECT statement:

name email
Greg D. Benson [email protected]
David Guy Brizan [email protected]
Christopher Brooks [email protected]
Mehmet Emre [email protected]
Sophie J. Engle [email protected]
Alark Joshi [email protected]
EJ Jung [email protected]
Olga Karpenko [email protected]
Michael C. Kremer [email protected]
Matthew Malensek [email protected]
Phil Peterson [email protected]
Vahab Pournaghshband [email protected]
Kelsey Urgo [email protected]
Ellen Veomett [email protected]
David Wolber [email protected]
Beste F. Yuksel [email protected]

Now we can start working with the data in the other tables.

GitHub Table

See if you can re-create the following table with a SELECT statement:

name github
Greg D. Benson @gdbenson
David Guy Brizan @dbrizan
Mehmet Emre @maemre
Sophie J. Engle @sjengle
Alark Joshi @alark
Olga Karpenko @okarpenko
Matthew Malensek @malensek
Phil Peterson @phpeterson-usf
Vahab Pournaghshband @vhbsoft
Kelsey Urgo @kelseyurgo
Ellen Veomett @eveomett
David Wolber @wolberd

Now, we can start trying to join some information together across table.

Courses Table

Next, lets see if we can create a list of courses and who teaches them. It is easier to start by just counting the number of people that teach each course:

course professors
CS 107 2
CS 110 5
CS 112 4
CS 186 1
CS 220 1
CS 221 3
CS 245 4
CS 272 3

Now, we can move to the full table:

course professors
CS 107 David Wolber, Beste F. Yuksel
CS 110 Alark Joshi, Michael C. Kremer, Kelsey Urgo, David Wolber, Beste F. Yuksel
CS 112 Alark Joshi, EJ Jung, Olga Karpenko, David Wolber
CS 186 Sophie J. Engle
CS 220 Matthew Malensek
CS 221 EJ Jung, Phil Peterson, Vahab Pournaghshband
CS 245 David Guy Brizan, EJ Jung, Olga Karpenko, Ellen Veomett
CS 272 Sophie J. Engle, Olga Karpenko, Phil Peterson