Re: Distinct max() and separate unique value

2009-10-20 Thread DaWiz
- Original Message - From: "Eric Anderson" To: Sent: Tuesday, October 20, 2009 4:05 PM Subject: Re: Distinct max() and separate unique value I'm trying to formulate a query on a Wordpress database that will give me the highest 'object_id' with the

Re: Distinct max() and separate unique value

2009-10-20 Thread Eric Anderson
On Tue, 20 Oct 2009, DaWiz wrote: I would try: select max(object_id), term_taxonomy_id group by term_taxonomy_id order by term_taxonomy_id; max(column) returns a single value so distinct is not needed. The group by and order by should only have columns thaqt are displayed and that are not agg

Re: Distinct max() and separate unique value

2009-10-20 Thread DaWiz
Message - From: "Eric Anderson" To: Sent: Tuesday, October 20, 2009 3:42 PM Subject: Distinct max() and separate unique value I'm trying to formulate a query on a Wordpress database that will give me the highest 'object_id' with the highest 'term

Distinct max() and separate unique value

2009-10-20 Thread Eric Anderson
I'm trying to formulate a query on a Wordpress database that will give me the highest 'object_id' with the highest 'term_taxonomy_id', something like: +-+--+ | max(distinct object_id) | term_taxonomy_id | +-+--+ |