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 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'd like to do is compute the average for each domain:
> for example, there are many machine names in the adelphia.com domain, and
> I'd like to get an average of all adelphia.com results...and all other
> domains found in the database, which may increase daily.
>
> I'm pretty new to SQL, so this is kinda befuddling to me.  Oh, the page is
> in PHP if it needs a little extracurricular touch.
>
> thanks a million!
> Dan
>
>


----------------------------------------------------------------------------
----


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


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

Reply via email to