"*** 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)

"*** students who did not apply anywhere ***"
count
6

(1 row)

sid sname gpa sizehs
320 Lori   2500
432 Kevin   1500
456 Doris 3.9 1000
567 Edward 2.9 2000
654 Amy 3.9 1000
789 Gary 3.4 800

(6 rows)

"*** have those students apply to Carnegie Mellon in CS ***"
count
21

(1 row)

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)

count
27

(1 row)

sid cname major decision
123 Berkeley CS t
123 Stanford EE f
123 Stanford CS t
123 Cornell EE t
234 Berkeley biology f
320 Carnegie Mellon CS  
321 MIT psychology t
321 MIT history f
345 MIT bioengineering t
345 Cornell bioengineering f
345 Cornell CS t
345 Cornell EE f
432 Carnegie Mellon CS  
456 Carnegie Mellon CS  
543 MIT CS f
567 Carnegie Mellon CS  
654 Carnegie Mellon CS  
678 Stanford history t
765 Cornell history f
765 Cornell psychology t
765 Stanford history t
789 Carnegie Mellon CS  
876 Stanford CS f
876 MIT marine biology f
876 MIT biology t
987 Stanford CS t
987 Berkeley CS t

(27 rows)

"*** students who applied to EE and were rejected ***"
count
2

(1 row)

sid
123
345

(2 rows)

sid
123
345

(2 rows)

"*** have those students apply to Carnegie Mellon in EE ***" "*** and be accepted ***"
count
27

(1 row)

sid cname major decision
123 Berkeley CS t
123 Stanford EE f
123 Stanford CS t
123 Cornell EE t
234 Berkeley biology f
320 Carnegie Mellon CS  
321 MIT psychology t
321 MIT history f
345 MIT bioengineering t
345 Cornell bioengineering f
345 Cornell CS t
345 Cornell EE f
432 Carnegie Mellon CS  
456 Carnegie Mellon CS  
543 MIT CS f
567 Carnegie Mellon CS  
654 Carnegie Mellon CS  
678 Stanford history t
765 Cornell history f
765 Cornell psychology t
765 Stanford history t
789 Carnegie Mellon CS  
876 Stanford CS f
876 MIT marine biology f
876 MIT biology t
987 Stanford CS t
987 Berkeley CS t

(27 rows)

count
31

(1 row)

sid cname major decision
123 Cornell EE t
123 Berkeley CS t
123 Carnegie Mellon EE t
123 Carnegie Mellon EE t
123 Stanford EE f
123 Stanford CS t
234 Berkeley biology f
320 Carnegie Mellon CS  
321 MIT psychology t
321 MIT history f
345 Carnegie Mellon EE t
345 Cornell bioengineering f
345 Cornell CS t
345 Cornell EE f
345 MIT bioengineering t
345 Carnegie Mellon EE t
432 Carnegie Mellon CS  
456 Carnegie Mellon CS  
543 MIT CS f
567 Carnegie Mellon CS  
654 Carnegie Mellon CS  
678 Stanford history t
765 Stanford history t
765 Cornell psychology t
765 Cornell history f
789 Carnegie Mellon CS  
876 MIT biology t
876 Stanford CS f
876 MIT marine biology f
987 Berkeley CS t
987 Stanford CS t

(31 rows)