MySQL Forums
Forum List  »  Newbie

SUM of column in VIEW
Posted by: Pedro Cuica
Date: September 02, 2010 07:48AM

hi guys !!

i have 3 tables where i'm joining the information to create a view. when the view is created, appears something like this:

DATE FIELD1 FIELD2 FIELD3
20100901 code1 name1 number1
20100901 code2 name2 number2
20100901 code3 name3 number3
20100902 code4 name4 number4
20100901 code5 name5 number5
20100902 code6 name6 number6


now what i need, is to SUM the field3, by date, and then divide the field3 by the SUM result and insert it in a field4.

i've tryed so many ways, but nothing works, how can i fix this??

tku

Options: ReplyQuote


Subject
Written By
Posted
SUM of column in VIEW
September 02, 2010 07:48AM
September 02, 2010 08:01AM


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.