Re: top 20

From: Date: Mon, 27 Nov 2000 09:13:22 +0000
Subject: Re: top 20
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4755@lists.php.net to get a copy of this message
SELECT COUNT(column) AS whatever, column FROM table GROUP BY column ORDER BY whatever DESC LIMIT 10 Replace "column", "table", and "whatever" as appropriate. Doug At 01:25 AM 11/27/00 -0600, Edgar de Jesus Galicia wrote: >hello all!! >i have a table witha a field named resp, in that field store th name of a >user, so i want to build a top 10 based in the number of repetitions of >the name in that field, how can i biuld my query to obtain that?? i'm usin >postgres and php > >thnx!! >

« previous php.db (#4755) next »