|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Table DRIVINGHISTORY
HISTORYID NOT NULL NUMBER(4) EMPLOYEEID NOT NULL NUMBER(4) OFFENCENO NOT NULL VARCHAR2(10) OFFENCETYPE NOT NULL VARCHAR2(20) OFFENCEDATE NOT NULL DATE DEMERITPOINT NOT NULL NUMBER(2) TABLE DRIVER EMPLOYEEID NOT NULL NUMBER(4) FNAME NOT NULL VARCHAR2(15 LNAME NOT NULL VARCHAR2(20 DATEJOINED NOT NULL DATE YEAREXPERIENCE NOT NULL NUMBER(2) LICENCENO NOT NULL VARCHAR2(10 LICENCECLASS NOT NULL CHAR(2) PHONENO NOT NULL CHAR(12) I'm to list Employee ID, First and last name and Total of thier demerit points for those employees whose demerit points are greater than 9. Any help would be greatly appreciated. Last edited by ratumeli : October 26th, 2003 at 05:42 AM. |
|
#2
|
|||
|
|||
|
Code:
select d.EMPLOYEEID , d.FNAME , d.LNAME , sum(dh.DEMERITPOINT ) from DRIVINGHISTORY as dh , DRIVER as d where dh.EMPLOYEEID = d.EMPLOYEEID group by d.EMPLOYEEID , d.FNAME , d.LNAME having sum(dh.DEMERITPOINT ) > 9 |
|
#3
|
|||
|
|||
|
thanks again...swampboogie.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Nested Query Problem..driving me nuts :-/ |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|