Re: [SQL] pgsql aggregate: conditional max

2006-03-12 Thread Weimao Ke
k you! Weimao -- Daniel -- All best, Weimao Weimao Ke Indiana University Bloomington School of Library and Information Science http://ella.slis.indiana.edu/~wke ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] pgsql aggregate: conditional max

2006-03-12 Thread Weimao Ke
, weight); This query will return duplicates if there are multiple categories (for one aid) with the same max weight. Yet, I should be able to remove the duplicates somehow...:) I really appreciate your help! -- All best, Weimao Weimao Ke Indiana University Bloomington School of Library and

Re: [SQL] pgsql aggregate: conditional max

2006-03-12 Thread Weimao Ke
example data it returns the entire table, not the (aid, cat) pair with the max weight for a given aid. Michael is right. This query does not solve the problem... -- All best, Weimao Weimao Ke Indiana University Bloomington School of Library and Information Science http://ella.slis.indiana.edu

[SQL] pgsql aggregate: conditional max

2006-03-11 Thread Weimao Ke
| Adult Any ideas? Thank you! :) -- All best, Weimao Weimao Ke Indiana University Bloomington School of Library and Information Science http://ella.slis.indiana.edu/~wke ---(end of broadcast)--- TIP 4: Have you searched our list