Re: SQL query...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Muhammed Mamedov" <muhammed@xxxxxxxxxx>


> Try this
>
>  "SELECT DISTINCT(file_name), Count(file_name) AS cnt FROM $table_name
WHERE
> date
> > BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by cnt;
> > desc"

If you're GROUPing by "file_name" then you don't need DISTINCT(file_name)...
it's redundant.

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux