MySQL Forums
Forum List  »  German

how to count this
Posted by: maybelyn benitez
Date: August 04, 2014 08:50AM

hi this is my code and i cant get it right the total discount dont have the right values what will i do?

SELECT departmentcode as `DEPARTMENTCODE`,sum(discount) as `Total Discount`
from department D,scholarship S,program P,registration R,assessment A
where S.scholarshipid=R.scholarshipi
and R.programid=P.programid
and P.departmentid=D.departmentid
AND SY='2014-2015' AND SEM='1ST' AND isEnrolled!='NO'
group by 1
order by 1
this is my design
file:///C:/Users/User/Desktop/fd%20(5)/sql/OUTPUT/erd.bmp

Options: ReplyQuote


Subject
Views
Written By
Posted
how to count this
1312
August 04, 2014 08:50AM
638
August 19, 2014 09:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.