From: Michael S. <Mic...@lr...> - 2005-04-29 07:58:22
|
On Thu, 28 Apr 2005, Who Knows wrote: > Lionel Bouton wrote: > > > > >I'll do this for 1.5.6. > > > >A quick question though. I'm wondering if a "src_awl" would be of any > >use, could people with large sites check how many entries they have in > >domain_awl for the same src ? > >I'm interested in the results of > >SELECT src, count(*) FROM domain_awl GROUP BY src ORDER BY -count(*) > >LIMIT 10; > >and > >SELECT count(*) FROM domain_awl; > > > > > I'm running mysql-server-3.23.58-4 and it failed attemping your query > > *SQL-query:* Documentation <http://dev.mysql.com/doc/mysql/en/SELECT.html> > > SELECT src, count( * ) > FROM domain_awl > GROUP BY src > ORDER BY - count( * ) > LIMIT 10 > > *MySQL said: *Documentation > <http://dev.mysql.com/doc/mysql/en/Error-returns.html> > > | #1111 - Invalid use of group function| > The same error appeared at my installation. That's the reason why I use the command select host_ip,count(*) as cnt from domain_awl group by host_ip order by cnt desc limit 10; or select src,count(*) as cnt from domain_awl group by src order by cnt desc limit 10; Michael Storz ------------------------------------------------- Leibniz-Rechenzentrum ! <mailto:St...@lr...> Barer Str. 21 ! Fax: +49 89 2809460 80333 Muenchen, Germany ! Tel: +49 89 289-28840 |