Re: urgent: Trying to get COUNT for fairly elaborate query

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

 





chris smith-9 wrote:
> 
> Ah - that would be the group by doing that.
> 
> Removing those:
> 
> GROUP BY eta.id ORDER BY subcat_count DESC, eta.id
> 
> Does that get you what you want?
> 
> If it gives you one result - make sure it's right. Change a few id's, 
> make sure they match up to what your other query returns.
> 

I really appreciate your help by the way.

I've also tried that.  I do get a single value when I do that but the count
is too high!  Each of the esa associations gets counted separately rather
than just once.  The original COUNT and GROUP BY parts limit the number of
records by aggregating all the esa records per event into a single count -
which is what i want.




-- 
View this message in context: http://www.nabble.com/urgent%3A-Trying-to-get-COUNT-for-fairly-elaborate-query-tf2449123.html#a6827251
Sent from the Php - Database mailing list archive at Nabble.com.

-- 
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