sneakyimp wrote:
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.
I don't understand.
What results do you get from the original query (just the 2-3 columns we
need please) ?
What does the "new" query (that doesn't work) give you?
What do you want to get from the count query?
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php