I am trying to construct what is proving to be a somewhat tricky SQL query.
I have a database in which wireless activity data is dumped.  The following
is a boiled down version of what the table and the contents may look like:

Date,Unit,InputOctets,OutputOctets,AccountingID
2004-01-31 23:59:05,0E:3A:0F,10101,3949,SLAKRMMM
2004-02-01 00:04:07,0E:3A:0F,13843,4192,SLAKRMMM
2004-02-01 00:09:10,0E:3A:0F,53233,9021,SLAKRMMM
2004-02-01 00:14:08,0E:3A:0F,2383,109,NX0ADFF
...
2004-02-29 23:59:15,0E:3A:0F,481234,18233,LAQ5YN3

This requires a bit of explanation.  The Unit is the actually wireless
modem, and the octet counts are the totals for the unit since it was last
rebooted (by adding the new byte activity since the last accounting data
five minutes before).  The problem comes when the unit is rebooted.  At that
point the counters start at 0 and a new accounting ID is written.

What I need to do is to find out just how much traffic that unit has done in
the month of February.  I realize I will have to do one query to discover
the byte counts for the last record in January, but beyond that I'm stumped.

-- 
Aaron Clausen


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to