Hi, Could any one show me how to write the following
function?  Thank you very, very much!  

The GPA Function

1. A GPA is calculated in the following fashion:
Assume a student receives
an A on a 3-credit_hour course and a D on a
2-credit-hour course. His grade
is (4*3+1*2)/(3+2)=2.8.

2.Repeat_delete Policy: A student may repeat a course
as many times as he
wants. However, if the first grade he receives on this
course is a D or F,
then the second grade will automatically replaces the
first grade, and the
first enrollment will not go into his GPA calculation.
Under any other
circumstances, his grades will be considered as a
regular grade and be
taken into consideration for GPA.

create table Enrollment(
Student# NUMBER (7),
SNUM NUMBER (5),
Call# NUMBER (7),
Semester char (8),
GRADE char (3),
Credit number,
Withdraw_Date Date);

SNUM + Call# represents one class.

 Insert into Enrollment
values('58001','111','70070','Sp2000','F',3, null);
Insert into Enrollment
values('58001','111','70070','Fa2000','B',3, null);
Insert into Enrollment
values('58003','222','70070','Sp2000','A',2, null);
Insert into Enrollment
values('58004','333','80025','Fa2000','A',2, null);
Insert into Enrollment
values('58005','222','80025','Fa2000','C',3, null);




__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Andrea Oracle
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to