One URGENT question about SQL [message #37475] |
Mon, 11 February 2002 06:32 |
Chen Wen
Messages: 26 Registered: February 2002
|
Junior Member |
|
|
There are three tables: course, sect and enrolled.
How to list all departments, numbers, minimum enrollment, and how far they're under that will be cancelled due to under-enrollment.
course:
DEPT NUM NAME CREDITS
-------------------------------
CSCI 541 Database 3
CPT 541 Access 4
CSCI 702 PhD Thesis 3
sect:
DEPT NUM SECT MIN_NUM MAX_NUM
----------------------------------------
CSCI 541 B332 20 30
CPT 541 S873 30 150
CSCI 701 B411 1 1
CSCI 702 B445 1 3
CSCI 701 B412 1 2
CSCI 701 B4131 1 1
enrolled:
SIDN SECT CREDITS
---------- ----- -------
111111111 B411 2
222222222 B332 3
111111111 B412 3
222222222 B412 4
333333333 B412 3
|
|
|
|