Page 1 of 1

Complicate math problem :D

Posted: Thu Feb 24, 2011 1:45 am
by nackgr
Hallo

I have a table with 9 colums

serial | cli | cld | connect_time | metric | chargetime | charge |destination |de_charge


I want for each serial to chargetime /60 and * with de_charge

For each serial for all serials and if is able to can add between dates
IF someone can help me i will gratefull
Thanks very much

Re: Complicate math problem :D

Posted: Thu Feb 24, 2011 3:55 am
by Apollo
I want for each serial to chargetime /60 and * with de_charge

For each serial for all serials and if is able to can add between dates
What? Image

Re: Complicate math problem :D

Posted: Thu Feb 24, 2011 4:00 am
by nackgr
hahah sorry :D

I upload a demo of the file it inside a mysql table

I want for each serial somehow take chargetime division with 60 and propagation with de_charge number

Thanks :D

Re: Complicate math problem :D

Posted: Thu Feb 24, 2011 4:55 am
by Apollo
So, what's the problem with (chargetime/60)*de_charge ?

Re: Complicate math problem :D

Posted: Thu Feb 24, 2011 5:17 am
by nackgr
SELECT serial
, chargetime / 60 * de_charge AS result
FROM daTable

I forgot to mention the problem is how can i make it work between dates i have a colum with dates too

Re: Complicate math problem :D

Posted: Thu Feb 24, 2011 5:38 am
by nackgr
SELECT serial
, chargetime / 60 * de_charge AS result
FROM daTable
where connect_time between 'date' and 'date