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

"*** select * from Student where (GPA > 3.7) ***"
sid sname gpa sizehs
123 Amy 3.9 1000
456 Doris 3.9 1000
654 Amy 3.9 1000
678 Fay 3.8 200
876 Irene 3.9 400

(5 rows)

"*** select * from Student where (GPA > 3.7) and (sizeHS < 1000) ***"
sid sname gpa sizehs
678 Fay 3.8 200
876 Irene 3.9 400

(2 rows)

"*** select * from Apply where (cName = 'Stanford') and (major = 'CS') ***"
sid cname major decision
123 Stanford CS t
876 Stanford CS f
987 Stanford CS t

(3 rows)

"*** select sID, decision from Apply ***"
sid decision
123 t
123 t
123 t
123 f
234 f
321 f
321 t
345 f
345 t
345 f
345 t
543 f
678 t
765 f
765 t
765 t
876 t
876 f
876 f
987 t
987 t

(21 rows)

"*** select sID, sName from Student where (GPA > 3.7) ***"
sid sname
123 Amy
456 Doris
654 Amy
678 Fay
876 Irene

(5 rows)

"*** select major, decision from Apply order by major ***"
major decision
bioengineering f
bioengineering t
biology f
biology t
CS t
CS t
CS t
CS f
CS f
CS t
CS t
EE f
EE t
EE f
history f
history t
history t
history f
marine biology f
psychology t
psychology t

(21 rows)

"*** select distinct major, decision from Apply order by major ***"
major decision
bioengineering t
bioengineering f
biology f
biology t
CS f
CS t
EE f
EE t
history t
history f
marine biology f
psychology t

(12 rows)