Re: [GENERAL] Hibernate Query Question - Get most recent unique rows

2006-03-24 Thread Jim C. Nasby
On Fri, Mar 24, 2006 at 12:13:24PM -0600, Julie Robinson wrote: > OK. The following how to do this in SQL. How does this convert into HQL? > > select distinct on (qualitycontrolrange) qualitycontrolrange, date, id > from quality_control_reset > order by qualitycontrolrange, date desc; That won'

Re: [GENERAL] Hibernate Query Question - Get most recent unique rows

2006-03-24 Thread Julie Robinson
OK. The following how to do this in SQL. How does this convert into HQL? select distinct on (qualitycontrolrange) qualitycontrolrange, date, id from quality_control_reset order by qualitycontrolrange, date desc; Julie Robinson wrote: Given the two classes at the bottom of this email, I'm h

[GENERAL] Hibernate Query Question - Get most recent unique rows

2006-03-24 Thread Julie Robinson
Given the two classes at the bottom of this email, I'm having trouble coming up with a Hibernate query statement that returns a list representing all rows in the quality_control_reset table where there is only one row for the most recent quality_control_range. Help? Example: In table quality