Re: SQL sums

From: Date: Fri, 03 Dec 2004 16:40:31 +0000
Subject: Re: SQL sums
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-203435@lists.php.net to get a copy of this message
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:


« previous php.general (#203435) next »