"*** select * from Student ***"
sid sname gpa sizehs
123 Amy 3.9 1000
234 Bob 3.6 1500
320 Lori   2500
345 Craig 3.5 500
432 Kevin   1500
456 Doris 3.9 1000
543 Craig 3.4 2000
567 Edward 2.9 2000
654 Amy 3.9 1000
678 Fay 3.8 200
765 Jay 2.9 1500
789 Gary 3.4 800
876 Irene 3.9 400
987 Helen 3.7 800

(14 rows)

"*** select * from Apply ***"
sid cname major decision
123 Berkeley CS t
123 Cornell EE t
123 Stanford CS t
123 Stanford EE f
234 Berkeley biology f
321 MIT history f
321 MIT psychology t
345 Cornell bioengineering f
345 Cornell CS t
345 Cornell EE f
345 MIT bioengineering t
543 MIT CS f
678 Stanford history t
765 Cornell history f
765 Cornell psychology t
765 Stanford history t
876 MIT biology t
876 MIT marine biology f
876 Stanford CS f
987 Berkeley CS t
987 Stanford CS t

(21 rows)

"*** select * from College ***"
cname state enrollment
Berkeley CA 36000
Cornell NY 21000
Irene TX 25000
MIT MA 10000
Stanford CA 15000

(5 rows)

"*** applications of students who applied to Cornell ***" "*** with a GPA < 3.6 ***"
count
5

(1 row)

sid sname gpa sizehs cname major decision
345 Craig 3.5 500 Cornell EE f
345 Craig 3.5 500 Cornell CS t
345 Craig 3.5 500 Cornell bioengineering f
765 Jay 2.9 1500 Cornell psychology t
765 Jay 2.9 1500 Cornell history f

(5 rows)

count
5

(1 row)

sid cname major decision
765 Cornell psychology t
765 Cornell history f
345 Cornell EE f
345 Cornell CS t
345 Cornell bioengineering f

(5 rows)

"*** change those applications from Cornell to UT ***" "*** and have them accepted ***"
count
5

(1 row)

sid sname gpa sizehs cname major decision
345 Craig 3.5 500 UT bioengineering t
345 Craig 3.5 500 UT CS t
345 Craig 3.5 500 UT EE t
765 Jay 2.9 1500 UT history t
765 Jay 2.9 1500 UT psychology t

(5 rows)

sid cname major decision
765 UT history t
765 UT psychology t
345 UT bioengineering t
345 UT CS t
345 UT EE t

(5 rows)

sid cname major decision
765 UT history t
765 UT psychology t
345 UT bioengineering t
345 UT CS t
345 UT EE t

(5 rows)

"*** applications of students with the highest GPA ***" "*** who applied to CS ***"
count
7

(1 row)

sid sname gpa sizehs cname major decision
123 Amy 3.9 1000 Berkeley CS t
123 Amy 3.9 1000 Stanford CS t
876 Irene 3.9 400 Stanford CS f
987 Helen 3.7 800 Berkeley CS t
987 Helen 3.7 800 Stanford CS t
345 Craig 3.5 500 UT CS t
543 Craig 3.4 2000 MIT CS f

(7 rows)

sid sname gpa sizehs cname major decision
123 Amy 3.9 1000 Stanford CS t
123 Amy 3.9 1000 Berkeley CS t
876 Irene 3.9 400 Stanford CS f

(3 rows)

"*** change those applications from CS to CSE ***"
count
3

(1 row)

sid sname gpa sizehs cname major decision
123 Amy 3.9 1000 Berkeley CSE t
123 Amy 3.9 1000 Stanford CSE t
876 Irene 3.9 400 Stanford CSE f

(3 rows)

"*** change every student to have the highest GPA ***" "*** and smallest school size ***"
count
14

(1 row)

sid sname gpa sizehs
123 Amy 3.9 1000
234 Bob 3.6 1500
320 Lori   2500
345 Craig 3.5 500
432 Kevin   1500
456 Doris 3.9 1000
543 Craig 3.4 2000
567 Edward 2.9 2000
654 Amy 3.9 1000
678 Fay 3.8 200
765 Jay 2.9 1500
789 Gary 3.4 800
876 Irene 3.9 400
987 Helen 3.7 800

(14 rows)

count
14

(1 row)

sid sname gpa sizehs
123 Amy 3.9 200
234 Bob 3.9 200
320 Lori 3.9 200
345 Craig 3.9 200
432 Kevin 3.9 200
456 Doris 3.9 200
543 Craig 3.9 200
567 Edward 3.9 200
654 Amy 3.9 200
678 Fay 3.9 200
765 Jay 3.9 200
789 Gary 3.9 200
876 Irene 3.9 200
987 Helen 3.9 200

(14 rows)

"*** accept all students ***"
count
21

(1 row)

sid cname major decision
123 Cornell EE t
123 Stanford EE f
234 Berkeley biology f
321 MIT history f
321 MIT psychology t
345 MIT bioengineering t
543 MIT CS f
678 Stanford history t
765 Stanford history t
876 MIT biology t
876 MIT marine biology f
987 Berkeley CS t
987 Stanford CS t
765 UT psychology t
765 UT history t
345 UT EE t
345 UT CS t
345 UT bioengineering t
876 Stanford CSE f
123 Stanford CSE t
123 Berkeley CSE t

(21 rows)

count
21

(1 row)

sid cname major decision
123 Cornell EE t
123 Stanford EE t
234 Berkeley biology t
321 MIT history t
321 MIT psychology t
345 MIT bioengineering t
543 MIT CS t
678 Stanford history t
765 Stanford history t
876 MIT biology t
876 MIT marine biology t
987 Berkeley CS t
987 Stanford CS t
765 UT psychology t
765 UT history t
345 UT EE t
345 UT CS t
345 UT bioengineering t
876 Stanford CSE t
123 Stanford CSE t
123 Berkeley CSE t

(21 rows)