Re: A fun one

2004-01-24 Thread Roger Baklund
* Matt W > * me > > You shouldn't use text columns for ip/name... ip addresses fits in an > > unsigned int > > Yeah, I want to use an INT UNSIGNED column for IPs, which is great for > the space savings... except people have brought up the issue of IPv6 > addresses (128-bit; 32 hex chars IIRC). I'v

Re: A fun one

2004-01-24 Thread Roger Baklund
* [EMAIL PROTECTED] [...] > The fun part to which I refer is (what I perceive to be) the crux of the > problem: figuring out all (for example) adelphia.com records, > finding their average speed, and spitting out that one line. Isn't that what my example queries are doing? > What I was thinking o

Re: A fun one

2004-01-24 Thread dan
From: "Roger Baklund" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, January 24, 2004 5:09 PM Subject: Re: A fun one > * [EMAIL PROTECTED] > > > * Don Read > > > See SUBSTRING_INDEX() > > > Alm

Re: A fun one

2004-01-24 Thread Matt W
Hey Roger, - Original Message - From: "Roger Baklund" Sent: Saturday, January 24, 2004 7:09 PM Subject: Re: A fun one > You shouldn't use text columns for ip/name... ip addresses fits in an > unsigned int Yeah, I want to use an INT UNSIGNED column for IPs, which i

Re: A fun one

2004-01-24 Thread Roger Baklund
setting the date column to be equal to what it allready is... This is described in the manual: http://www.mysql.com/doc/en/DATETIME.html > If you want a DATETIME column instead of the TIMESTAMP: ALTER TABLE readings MODIFY date DATETIME NOT NULL; > Here's what I want: > adelphia.net: 3

Re: A fun one

2004-01-24 Thread dan
;); INSERT INTO `readings` VALUES (20040120154905, '1307.6', '4.62.127.164', 'lsanca1-ar1-4-62-127-164.lsanca1.dsl-verizon.net'); INSERT INTO `readings` VALUES (20040123194031, '125.8', '68.66.221.27', '68-66-221-27.vnnyca.adelphia.net

Re: A fun one

2004-01-24 Thread dread
On 24-Jan-2004 [EMAIL PROTECTED] wrote: > Here's a fun one to tickle your brains: > > I've got a table holding the results of a bandwidth tester thingie. > Its > columns hold the date and time the test was run, the fully-qualified > machine > name of the comput

Re: A fun one

2004-01-24 Thread KKoTY
try SELECT domain,AVG(speed) FROM your_table GROUP BY domain where domain and speed are columns of table your_table - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 24, 2004 10:59 AM Subject: A fun one > Here's a fu

A fun one

2004-01-24 Thread dan
Here's a fun one to tickle your brains: I've got a table holding the results of a bandwidth tester thingie. Its columns hold the date and time the test was run, the fully-qualified machine name of the computer that took it, its IP address, and the speed in kilobits/sec. What I'