Re: SQL sums

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Raditha Dissanayake wrote:
Marek Kilimajer wrote:

This is an SQL question.


Marek, don't you know that this the mysql list? you are supposed to answer questions like these. If you don't there will be self appointed list moderators who will jump on you like what happened to me last week. I was accused of being not helpfull.

Ok, I appologize :)))

This should get you started:

SELECT s1.add_time, sum(s2.sent) sent_total, sum(s2.received) received_total FROM sum_by_time s1, sum_by_time s2 WHERE (s1.add_time > s2.add_time and s1.add_time < s2.add_time + 10) group by FLOOR(s1.add_time / 10)




James Nunnerley wrote:

I'm trying to create a table, and ultimately a graph, out of some syslog
data.



I have a mysql table with the following info in it:





-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux