Re: [Hibernate] Top 10 with Hibernate

2004-09-07 Thread Christian Bauer
On Sep 7, 2004, at 7:58 PM, Regis Melo wrote: A need to retrieve the 10 most sold items. How can I do that with Hibernate? Please use the user forum. -- Christian Bauer +49 171 455 66 53 callto://christian-bauer Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss Inc [EMAIL PROTECTED] http://j

[Hibernate] Top 10 with Hibernate

2004-09-07 Thread Regis Melo
Hello! I've two tables - product and salesItems. A need to retrieve the 10 most sold items. How can I do that with Hibernate? I try: String qry = "select p, sum( Sales.qty ) " + "from Product p" + "group by p.partNumber " +